Source:
<code>public void testImportWithCheckGroups() throws IOException { File tmzFile = folder.newFile("CheckGroup.tmz"); Lib.inputStreamToFile(getClass().getResourceAsStream("CheckGroup.tmz"), tmzFile); TmzImporter importer = new TmzImporter(null, factory); OperationReport report = new OperationReport(); List<DispoItem> results = importer.importDirectory(new HashMap<String, DispoItem>(), folder.getRoot(), report); Assert.assertEquals(1, results.size()); DispoItem result = results.get(0); Assert.assertEquals("CheckGroup", result.getName()); Assert.assertEquals(2, result.getDiscrepanciesList().size()); Assert.assertEquals("113054", result.getVersion()); boolean firstFound = false, thirdFound = false; for (String key : result.getDiscrepanciesList().keySet()) { <START> Discrepancy discrepancy = result.getDiscrepanciesList().get(key); <END> if (Integer.valueOf(discrepancy.getLocation()) == 1) { firstFound = true; Assert.assertEquals( "Failure at Test Point 1. Check Group with Checkpoint Failures: Check Point: CODE. Expected: 1500. Actual: NULL. Check Point: STATE. Expected: TRUE. Actual: NULL. Check Point: IBOT. Expected: FALSE. Actual: NULL. Check Point: BOT_CODE. Expected: 0. Actual: NULL. Check Point: FILTER_TIME. Expected: 10000. Actual: NULL. ", discrepancy.getText()); } else if (Integer.valueOf(discrepancy.getLocation()) == 3) { thirdFound = true; Assert.assertEquals( "Failure at Test Point 3. Check Point: CheckPoint_BOT. Expected: ORANGE = FALSE. Actual: ORANGE = NULL. ", discrepancy.getText()); } } Assert.assertTrue(firstFound); Assert.assertTrue(thirdFound); }</code><technical_language>If locations strings now, do string comparison converting Integer? (same below)</technical_language>

Target:
public void testImportWithCheckGroups() throws IOException { File tmzFile = folder.newFile("CheckGroup.tmz"); Lib.inputStreamToFile(getClass().getResourceAsStream("CheckGroup.tmz"), tmzFile); TmzImporter importer = new TmzImporter(null, factory); OperationReport report = new OperationReport(); List<DispoItem> results = importer.importDirectory(new HashMap<String, DispoItem>(), folder.getRoot(), report); Assert.assertEquals(1, results.size()); DispoItem result = results.get(0); Assert.assertEquals("CheckGroup", result.getName()); Assert.assertEquals(2, result.getDiscrepanciesList().size()); Assert.assertEquals("113054", result.getVersion()); boolean firstFound = false, thirdFound = false; for (String key : result.getDiscrepanciesList().keySet()) { Discrepancy discrepancy = result.getDiscrepanciesList().get(key); if (discrepancy.getLocation().equals("1")) { firstFound = true; Assert.assertEquals( "Failure at Test Point 1. Check Group with Checkpoint Failures: Check Point: CODE. Expected: 1500. Actual: NULL. Check Point: STATE. Expected: TRUE. Actual: NULL. Check Point: IBOT. Expected: FALSE. Actual: NULL. Check Point: BOT_CODE. Expected: 0. Actual: NULL. Check Point: FILTER_TIME. Expected: 10000. Actual: NULL. ", discrepancy.getText()); } else if (discrepancy.getLocation().equals("3")) { thirdFound = true; Assert.assertEquals( "Failure at Test Point 3. Check Point: CheckPoint_BOT. Expected: ORANGE = FALSE. Actual: ORANGE = NULL. ", discrepancy.getText()); } } Assert.assertTrue(firstFound); Assert.assertTrue(thirdFound); }