Commit 668ef83
test(coverage): expand Java/MCP/K8s tests for SonarCloud coverage boost
Adds 188 new tests targeting the highest-miss classes reported by SonarCloud:
- JavaDetectorsBranchCoverageTest: ClassHierarchyDetector (all node kinds, edges,
visibility, inner/outer classes, regex fallback branches), SpringRestDetector
(all HTTP methods, class-level prefix, produces/consumes, non-endpoint skip,
RestTemplate/WebClient/FeignClient CALLS edges), SpringSecurityDetector
(@EnableWebSecurity, @EnableMethodSecurity, SecurityFilterChain, @PreAuthorize
hasRole/hasAnyRole, @secured multi-role, @RolesAllowed, authorizeHttpRequests),
JpaEntityDetector (ManyToMany, @Version, targetEntity, table bare value),
PublicApiDetector (public/protected/static/abstract, skips getter/setter/
toString, interface methods, DEFINES edges), ConfigDefDetector (@value,
@ConfigurationProperties, Kafka ConfigDef.define, deduplication, method params),
MicronautDetector (GET/POST/PUT/DELETE, @singleton, @client, @Inject,
@scheduled, @eventlistener, no-indicator guard).
- KubernetesDetectorExpandedTest: StatefulSet, DaemonSet, Job, CronJob, Pod,
ConfigMap, Secret, Namespace, Ingress with rules and default backend, cross-
resource Ingress→Service CONNECTS_TO edges, container ports/env vars, init
containers, labels/annotations preservation, yaml_multi filtering.
- McpToolsExpandedTest: all topology tools (service_detail, service_dependencies,
service_dependents, blast_radius, find_path, find_bottlenecks, find_circular_deps,
find_dead_services, find_node) with empty-node and with-data scenarios; all
run_cypher mutation keywords blocked (CREATE/DELETE/MERGE/SET/REMOVE/DROP/
DETACH/FOREACH/CALL); get_capabilities full matrix and language filter;
get_evidence_pack/get_artifact_metadata null-assembler paths; error-handling
branches for every delegating tool.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent d45153d commit 668ef83
3 files changed
Lines changed: 2441 additions & 0 deletions
File tree
- src/test/java/io/github/randomcodespace/iq
- detector
- config
- java
- mcp
0 commit comments