@Test
public void testDynamicDatabaseLookups() {
Scan scan = ParserUtils.getScan("SBIR/contoso.xml");
EndpointDatabase database = getContosoEndpointDatabase(scan);
assert database != null : "Database was null, can't continue";
boolean succeededStudent = false, succeededCreate = false;
for (Finding finding : scan) {
Integer genericId = finding.getChannelVulnerability().getGenericVulnerability().getId();
if (genericId != null && genericId.equals(79)) {
Set<Endpoint> endpointList = database.findAllMatches(ThreadFixInterface.toEndpointQuery(finding));
if (!endpointList.isEmpty()) {
String path = finding.getSurfaceLocation().getPath();
if (path.equals("/contoso/Student/Create")) {
for (Endpoint endpoint : endpointList) {
if (endpoint.getFilePath().endsWith("StudentController.cs")) {