-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphControllerTest.java
More file actions
610 lines (500 loc) · 22.7 KB
/
Copy pathGraphControllerTest.java
File metadata and controls
610 lines (500 loc) · 22.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
package io.github.randomcodespace.iq.api;
import io.github.randomcodespace.iq.config.CodeIqConfig;
import io.github.randomcodespace.iq.query.QueryService;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.io.TempDir;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import static org.hamcrest.Matchers.*;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
import io.github.randomcodespace.iq.config.CodeIqConfigTestSupport;
/**
* Tests for the REST API controller using standalone MockMvc (no Spring context needed).
*/
@ExtendWith(MockitoExtension.class)
class GraphControllerTest {
private MockMvc mockMvc;
@Mock
private QueryService queryService;
private CodeIqConfig config;
@BeforeEach
void setUp() {
config = new CodeIqConfig();
CodeIqConfigTestSupport.override(config).maxDepth(10).done();
CodeIqConfigTestSupport.override(config).maxRadius(10).done();
CodeIqConfigTestSupport.override(config).rootPath(".").done();
var controller = new GraphController(queryService, config);
mockMvc = MockMvcBuilders.standaloneSetup(controller).build();
}
// --- /api/stats ---
@Test
void getStatsShouldReturnStats() throws Exception {
Map<String, Object> stats = new LinkedHashMap<>();
stats.put("node_count", 42L);
stats.put("edge_count", 18L);
stats.put("nodes_by_kind", Map.of("endpoint", 10L));
stats.put("nodes_by_layer", Map.of("backend", 30L));
when(queryService.getStats()).thenReturn(stats);
mockMvc.perform(get("/api/stats"))
.andExpect(status().isOk())
.andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))
.andExpect(jsonPath("$.node_count").value(42))
.andExpect(jsonPath("$.edge_count").value(18))
.andExpect(jsonPath("$.nodes_by_kind.endpoint").value(10));
}
// --- /api/kinds ---
@Test
void listKindsShouldReturnKinds() throws Exception {
Map<String, Object> kinds = new LinkedHashMap<>();
kinds.put("kinds", List.of(Map.of("kind", "endpoint", "count", 5L)));
kinds.put("total", 5);
when(queryService.listKinds()).thenReturn(kinds);
mockMvc.perform(get("/api/kinds"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.total").value(5))
.andExpect(jsonPath("$.kinds[0].kind").value("endpoint"));
}
// --- /api/kinds/{kind} ---
@Test
void nodesByKindShouldReturnPaginated() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("kind", "endpoint");
result.put("total", 1L);
result.put("nodes", List.of(Map.of("id", "n1", "kind", "endpoint")));
when(queryService.nodesByKind("endpoint", 50, 0)).thenReturn(result);
mockMvc.perform(get("/api/kinds/endpoint"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.kind").value("endpoint"))
.andExpect(jsonPath("$.total").value(1));
}
@Test
void nodesByKindShouldAcceptPaginationParams() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("kind", "class");
result.put("offset", 10);
result.put("limit", 25);
result.put("nodes", List.of());
when(queryService.nodesByKind("class", 25, 10)).thenReturn(result);
mockMvc.perform(get("/api/kinds/class?limit=25&offset=10"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.offset").value(10))
.andExpect(jsonPath("$.limit").value(25));
}
@Test
void nodesByKindShouldReturn400ForInvalidKind() throws Exception {
mockMvc.perform(get("/api/kinds/not_a_real_kind"))
.andExpect(status().isBadRequest());
}
@Test
void nodesByKindShouldClampNegativeOffset() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("kind", "endpoint");
result.put("nodes", List.of());
when(queryService.nodesByKind("endpoint", 50, 0)).thenReturn(result);
mockMvc.perform(get("/api/kinds/endpoint?offset=-5"))
.andExpect(status().isOk());
}
@Test
void nodesByKindShouldCapLimitTo1000() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("kind", "endpoint");
result.put("nodes", List.of());
when(queryService.nodesByKind("endpoint", 1000, 0)).thenReturn(result);
mockMvc.perform(get("/api/kinds/endpoint?limit=5000"))
.andExpect(status().isOk());
}
// --- /api/nodes ---
@Test
void listNodesShouldReturnNodes() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("nodes", List.of(Map.of("id", "n1")));
result.put("count", 1);
when(queryService.listNodes(null, 100, 0)).thenReturn(result);
mockMvc.perform(get("/api/nodes"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.count").value(1));
}
@Test
void listNodesShouldFilterByKind() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("nodes", List.of());
result.put("count", 0);
when(queryService.listNodes("endpoint", 100, 0)).thenReturn(result);
mockMvc.perform(get("/api/nodes?kind=endpoint"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.count").value(0));
}
@Test
void listNodesShouldReturn400ForInvalidKind() throws Exception {
mockMvc.perform(get("/api/nodes?kind=bogus_kind"))
.andExpect(status().isBadRequest());
}
@Test
void listNodesShouldClampNegativeOffset() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("nodes", List.of());
result.put("count", 0);
when(queryService.listNodes(null, 100, 0)).thenReturn(result);
mockMvc.perform(get("/api/nodes?offset=-10"))
.andExpect(status().isOk());
}
@Test
void listNodesShouldCapLimitTo1000() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("nodes", List.of());
result.put("count", 0);
when(queryService.listNodes(null, 1000, 0)).thenReturn(result);
mockMvc.perform(get("/api/nodes?limit=9999"))
.andExpect(status().isOk());
}
// --- /api/nodes/{nodeId}/detail ---
@Test
void nodeDetailShouldReturnDetail() throws Exception {
Map<String, Object> detail = new LinkedHashMap<>();
detail.put("id", "n1");
detail.put("kind", "endpoint");
detail.put("outgoing_edges", List.of());
detail.put("incoming_nodes", List.of());
when(queryService.nodeDetailWithEdges("n1")).thenReturn(detail);
mockMvc.perform(get("/api/nodes/n1/detail"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.id").value("n1"));
}
@Test
void nodeDetailShouldReturn404WhenNotFound() throws Exception {
when(queryService.nodeDetailWithEdges("missing")).thenReturn(null);
mockMvc.perform(get("/api/nodes/missing/detail"))
.andExpect(status().isNotFound());
}
// --- /api/nodes/{nodeId}/neighbors ---
@Test
void neighborsShouldReturnNeighbors() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("node_id", "n1");
result.put("direction", "both");
result.put("neighbors", List.of());
result.put("count", 0);
when(queryService.getNeighbors("n1", "both")).thenReturn(result);
mockMvc.perform(get("/api/nodes/n1/neighbors"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.direction").value("both"));
}
@Test
void neighborsShouldAcceptDirectionParam() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("direction", "out");
result.put("neighbors", List.of());
result.put("count", 0);
when(queryService.getNeighbors("n1", "out")).thenReturn(result);
mockMvc.perform(get("/api/nodes/n1/neighbors?direction=out"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.direction").value("out"));
}
// --- /api/edges ---
@Test
void listEdgesShouldReturnEdges() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("edges", List.of());
result.put("count", 0);
result.put("total", 0);
when(queryService.listEdges(null, 100, 0)).thenReturn(result);
mockMvc.perform(get("/api/edges"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.total").value(0));
}
@Test
void listEdgesShouldClampNegativeOffset() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("edges", List.of());
result.put("count", 0);
result.put("total", 0);
when(queryService.listEdges(null, 100, 0)).thenReturn(result);
mockMvc.perform(get("/api/edges?offset=-3"))
.andExpect(status().isOk());
}
@Test
void listEdgesShouldCapLimitTo1000() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("edges", List.of());
result.put("count", 0);
result.put("total", 0);
when(queryService.listEdges(null, 1000, 0)).thenReturn(result);
mockMvc.perform(get("/api/edges?limit=5000"))
.andExpect(status().isOk());
}
// --- /api/ego/{center} ---
@Test
void egoGraphShouldReturnSubgraph() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("center", "n1");
result.put("radius", 2);
result.put("nodes", List.of());
result.put("count", 0);
when(queryService.egoGraph("n1", 2)).thenReturn(result);
mockMvc.perform(get("/api/ego/n1"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.center").value("n1"));
}
@Test
void egoGraphShouldCapRadius() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("center", "n1");
result.put("radius", 10);
result.put("nodes", List.of());
result.put("count", 0);
when(queryService.egoGraph("n1", 10)).thenReturn(result);
mockMvc.perform(get("/api/ego/n1?radius=50"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.radius").value(10));
}
// --- /api/query/cycles ---
@Test
void findCyclesShouldReturnCycles() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("cycles", List.of(List.of("a", "b", "a")));
result.put("count", 1);
when(queryService.findCycles(100)).thenReturn(result);
mockMvc.perform(get("/api/query/cycles"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.count").value(1));
}
// --- /api/query/shortest-path ---
@Test
void shortestPathShouldReturnPath() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("source", "a");
result.put("target", "b");
result.put("path", List.of("a", "c", "b"));
result.put("length", 2);
when(queryService.shortestPath("a", "b")).thenReturn(result);
mockMvc.perform(get("/api/query/shortest-path?source=a&target=b"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.length").value(2));
}
@Test
void shortestPathShouldReturn404WhenNoPath() throws Exception {
when(queryService.shortestPath("a", "b")).thenReturn(null);
mockMvc.perform(get("/api/query/shortest-path?source=a&target=b"))
.andExpect(status().isNotFound());
}
// --- /api/query/consumers/{targetId} ---
@Test
void consumersOfShouldReturnConsumers() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("target", "t1");
result.put("consumers", List.of());
result.put("count", 0);
when(queryService.consumersOf("t1")).thenReturn(result);
mockMvc.perform(get("/api/query/consumers/t1"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.target").value("t1"));
}
// --- /api/query/producers/{targetId} ---
@Test
void producersOfShouldReturnProducers() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("target", "t1");
result.put("producers", List.of());
result.put("count", 0);
when(queryService.producersOf("t1")).thenReturn(result);
mockMvc.perform(get("/api/query/producers/t1"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.target").value("t1"));
}
// --- /api/query/callers/{targetId} ---
@Test
void callersOfShouldReturnCallers() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("target", "fn1");
result.put("callers", List.of());
result.put("count", 0);
when(queryService.callersOf("fn1")).thenReturn(result);
mockMvc.perform(get("/api/query/callers/fn1"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.target").value("fn1"));
}
// --- /api/query/dependencies/{moduleId} ---
@Test
void dependenciesOfShouldReturnDeps() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("module", "mod1");
result.put("dependencies", List.of());
result.put("count", 0);
when(queryService.dependenciesOf("mod1")).thenReturn(result);
mockMvc.perform(get("/api/query/dependencies/mod1"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.module").value("mod1"));
}
// --- /api/query/dependents/{moduleId} ---
@Test
void dependentsOfShouldReturnDependents() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("module", "mod1");
result.put("dependents", List.of());
result.put("count", 0);
when(queryService.dependentsOf("mod1")).thenReturn(result);
mockMvc.perform(get("/api/query/dependents/mod1"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.module").value("mod1"));
}
// --- /api/triage/component ---
@Test
void findComponentShouldReturnComponent() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("file", "src/app.py");
result.put("nodes", List.of());
result.put("count", 0);
when(queryService.findComponentByFile("src/app.py")).thenReturn(result);
mockMvc.perform(get("/api/triage/component?file=src/app.py"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.file").value("src/app.py"));
}
// --- /api/triage/impact/{nodeId} ---
@Test
void traceImpactShouldReturnImpact() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("source", "n1");
result.put("depth", 3);
result.put("impacted", List.of());
result.put("count", 0);
when(queryService.traceImpact("n1", 3)).thenReturn(result);
mockMvc.perform(get("/api/triage/impact/n1"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.source").value("n1"));
}
@Test
void traceImpactShouldCapDepth() throws Exception {
Map<String, Object> result = new LinkedHashMap<>();
result.put("source", "n1");
result.put("depth", 10);
result.put("impacted", List.of());
result.put("count", 0);
when(queryService.traceImpact("n1", 10)).thenReturn(result);
mockMvc.perform(get("/api/triage/impact/n1?depth=50"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.depth").value(10));
}
// --- /api/search ---
@Test
void searchGraphShouldReturnResults() throws Exception {
List<Map<String, Object>> results = List.of(
Map.of("id", "n1", "kind", "class", "label", "UserService")
);
when(queryService.searchGraph("User", 50)).thenReturn(results);
mockMvc.perform(get("/api/search?q=User"))
.andExpect(status().isOk())
.andExpect(jsonPath("$[0].label").value("UserService"));
}
// --- /api/file ---
@Test
void readFileShouldReturnContent(@TempDir Path tempDir) throws Exception {
Files.writeString(tempDir.resolve("hello.txt"), "Hello World", StandardCharsets.UTF_8);
CodeIqConfigTestSupport.override(config).rootPath(tempDir.toAbsolutePath().toString()).done();
var controller = new GraphController(queryService, config);
var fileMvc = MockMvcBuilders.standaloneSetup(controller).build();
fileMvc.perform(get("/api/file").param("path", "hello.txt"))
.andExpect(status().isOk())
.andExpect(content().string("Hello World"));
}
@Test
void readFileShouldReturn404ForMissing(@TempDir Path tempDir) throws Exception {
CodeIqConfigTestSupport.override(config).rootPath(tempDir.toAbsolutePath().toString()).done();
var controller = new GraphController(queryService, config);
var fileMvc = MockMvcBuilders.standaloneSetup(controller).build();
fileMvc.perform(get("/api/file").param("path", "nonexistent.txt"))
.andExpect(status().isNotFound());
}
@Test
void readFileShouldBlockPathTraversal(@TempDir Path tempDir) throws Exception {
CodeIqConfigTestSupport.override(config).rootPath(tempDir.toAbsolutePath().toString()).done();
var controller = new GraphController(queryService, config);
var fileMvc = MockMvcBuilders.standaloneSetup(controller).build();
fileMvc.perform(get("/api/file").param("path", "../../../etc/passwd"))
.andExpect(status().isForbidden())
.andExpect(content().string("Path traversal blocked"));
}
@Test
void readFileShouldReturnLineRange(@TempDir Path tempDir) throws Exception {
Files.writeString(tempDir.resolve("multi.txt"), "line1\nline2\nline3\nline4\nline5",
StandardCharsets.UTF_8);
CodeIqConfigTestSupport.override(config).rootPath(tempDir.toAbsolutePath().toString()).done();
var controller = new GraphController(queryService, config);
var fileMvc = MockMvcBuilders.standaloneSetup(controller).build();
fileMvc.perform(get("/api/file")
.param("path", "multi.txt")
.param("startLine", "2")
.param("endLine", "4"))
.andExpect(status().isOk())
.andExpect(content().string("line2\nline3\nline4"));
}
@Test
void readFileShouldReturnFullContentWithoutLineParams(@TempDir Path tempDir) throws Exception {
Files.writeString(tempDir.resolve("full.txt"), "aaa\nbbb\nccc", StandardCharsets.UTF_8);
CodeIqConfigTestSupport.override(config).rootPath(tempDir.toAbsolutePath().toString()).done();
var controller = new GraphController(queryService, config);
var fileMvc = MockMvcBuilders.standaloneSetup(controller).build();
fileMvc.perform(get("/api/file").param("path", "full.txt"))
.andExpect(status().isOk())
.andExpect(content().string("aaa\nbbb\nccc"));
}
// POST /api/analyze removed — API is read-only
// --- /api/file-tree ---
@Test
void getFileTreeShouldReturnHierarchicalTree() throws Exception {
Map<String, Object> treeResult = new LinkedHashMap<>();
treeResult.put("tree", List.of(
Map.of("name", "src", "type", "directory", "nodeCount", 10L, "children", List.of()),
Map.of("name", "pom.xml", "type", "file", "nodeCount", 1L, "children", List.of())));
treeResult.put("total_files", 3L);
when(queryService.getFileTree(any(), anyInt(), anyBoolean())).thenReturn(treeResult);
mockMvc.perform(get("/api/file-tree"))
.andExpect(status().isOk())
.andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))
.andExpect(jsonPath("$.total_files").value(3))
.andExpect(jsonPath("$.tree[0].name").value("src"))
.andExpect(jsonPath("$.tree[0].type").value("directory"))
.andExpect(jsonPath("$.tree[0].nodeCount").value(10))
.andExpect(jsonPath("$.tree[1].name").value("pom.xml"))
.andExpect(jsonPath("$.tree[1].type").value("file"));
}
@Test
void getFileTreeShouldPassDepthParam() throws Exception {
Map<String, Object> treeResult = new LinkedHashMap<>();
treeResult.put("tree", List.of());
treeResult.put("total_files", 0L);
when(queryService.getFileTree(eq(2), anyInt(), anyBoolean())).thenReturn(treeResult);
mockMvc.perform(get("/api/file-tree").param("depth", "2"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.total_files").value(0));
}
@Test
void getFileTreeShouldCapDepthAtMaxDepth() throws Exception {
Map<String, Object> treeResult = new LinkedHashMap<>();
treeResult.put("tree", List.of());
treeResult.put("total_files", 0L);
when(queryService.getFileTree(eq(10), anyInt(), anyBoolean())).thenReturn(treeResult);
mockMvc.perform(get("/api/file-tree").param("depth", "999"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.total_files").value(0));
verify(queryService).getFileTree(eq(10), anyInt(), anyBoolean());
}
}