boolean hasScans = false;
List<TestStepSecurityTestConfig> testStepSecurityTestList = getConfig().getTestStepSecurityTestList();
if (!testStepSecurityTestList.isEmpty()) {
for (int i = 0; i < testStepSecurityTestList.size(); i++) {
TestStepSecurityTestConfig testStepSecurityTest = testStepSecurityTestList.get(i);
if (testStepSecurityTest.getTestStepId().equals(testStep.getId())) {
newSecScan = buildSecurityScan(factory, newScanConfig, testStepSecurityTest, testStep);
hasScans = true;
break;
}
}
}
if (!hasScans) {
TestStepSecurityTestConfig testStepSecurityTest = getConfig().addNewTestStepSecurityTest();
testStepSecurityTest.setTestStepId(testStep.getId());
newSecScan = buildSecurityScan(factory, newScanConfig, testStepSecurityTest, testStep);
}
addSecurityScanToMapByTestStepId(testStep.getId(), newSecScan);