### Question:
SerecoFalsePositiveFinder { public boolean isFound(SerecoVulnerability vulnerability, FalsePositiveMetaData metaData) { if (! isVulnerabilityValid(vulnerability)) { return false; } if (! isMetaDataValid(metaData)) { return false; } switch (vulnerability.getScanType()) { case CODE_SCAN: return codeSCanStrategy.isFalsePositive(vulnerability, metaData); default: return false; } }  boolean isFound(SerecoVulnerability vulnerability, FalsePositiveMetaData metaData);  }### Answer:
@Test public void code_scan_triggers_codescan_strategy() { SerecoVulnerability vulnerability = TestSerecoVulnerabilityBuilder.builder(). name("name1"). codeScan(). location("location1"). source("source1"). relevantPart("relevant1"). callsCode(). callsCode(). callsCode(). location("location2"). source("source2"). relevantPart("relevant2"). end().build(); FalsePositiveMetaData metaData = fetchFirstEntryMetaDataOfExample3(); finderToTest.isFound(vulnerability, metaData); verify(codeSCanStrategy).isFalsePositive(vulnerability, metaData); }
@Test public void webscan_triggers_not_codescanstrategy() { SerecoVulnerability vulnerability = TestSerecoVulnerabilityBuilder.builder(). name("name1"). webScan(). end().build(); FalsePositiveMetaData metaData = fetchFirstEntryMetaDataOfExample3(); finderToTest.isFound(vulnerability, metaData); verify(codeSCanStrategy,never()).isFalsePositive(vulnerability, metaData); }
@Test public void infrascan_triggers_not_codescanstrategy() { SerecoVulnerability vulnerability = TestSerecoVulnerabilityBuilder.builder(). name("name1"). infraScan(). end().build(); FalsePositiveMetaData metaData = fetchFirstEntryMetaDataOfExample3(); finderToTest.isFound(vulnerability, metaData); verify(codeSCanStrategy,never()).isFalsePositive(vulnerability, metaData); }