Source:
<code>public void testConnectAnnotationsStringAnalyze() { for (Discrepancy discrepancy : dispoItem.getDiscrepanciesList().values()) { discrepancy.setLocation(discrepancy.getLocation() + "zzz"); } DispoAnnotationData annotationOne = new DispoAnnotationData(); annotationOne.setLocationRefs("1zzz, 2zzz, 3zzz,4zzz,5zzz,12zzz,13zzz,14zzz,15zzz,16zzz,17zzz,18zzz,20zzz"); annotationOne.setIsResolutionValid(true); annotationOne.setResolutionType("Modify_Code"); annotationOne.setIsAnalyze(true); annotationOne.setId(annotIdOne); List<String> idsOfCoveredDisc = new ArrayList<String>(); annotationOne.setIdsOfCoveredDiscrepancies(idsOfCoveredDisc); dispoConnector.connectAnnotation(annotationOne, dispoItem.getDiscrepanciesList()); List<DispoAnnotationData> annotationsList = new ArrayList<DispoAnnotationData>(); annotationsList.add(annotationOne); dispoItem.setAnnotationsList(annotationsList); List<String> idsOfCoveredDiscrepancies = annotationOne.getIdsOfCoveredDiscrepancies(); <START> Assert.assertTrue(idsOfCoveredDiscrepancies.size() == 13); <END> for (int i = 0; i < idsOfCoveredDiscrepancies.size(); i++) { if (i < 5) { assertEquals(idsOfCoveredDiscrepancies.get(i), idsForDiscrepancies1_5[i]); } else if (i < 12) { assertEquals(idsOfCoveredDiscrepancies.get(i), idsForDiscrepancies12_18[i - 5]); } else { assertEquals(idsOfCoveredDiscrepancies.get(i), id20); } } assertTrue(annotationOne.getIsConnected()); String actual = dispoConnector.getItemStatus(dispoItem); assertEquals(DispoStrings.Item_Analyzed, actual); }</code><technical_language>Instead of 13, a variable declared next string in setLocationRefs: e.g. int locationRefCount = 13; // provides count of refs in string for testing if string changes, person changing string count debug test failed</technical_language>

Target:
public void testConnectAnnotationsStringAnalyze() { for (Discrepancy discrepancy : dispoItem.getDiscrepanciesList().values()) { discrepancy.setLocation(discrepancy.getLocation() + "zzz"); } int idsSize = 13; DispoAnnotationData annotationOne = new DispoAnnotationData(); annotationOne.setLocationRefs("1zzz, 2zzz, 3zzz,4zzz,5zzz,12zzz,13zzz,14zzz,15zzz,16zzz,17zzz,18zzz,20zzz"); annotationOne.setIsResolutionValid(true); annotationOne.setResolutionType("Modify_Code"); annotationOne.setIsAnalyze(true); annotationOne.setId(annotIdOne); List<String> idsOfCoveredDisc = new ArrayList<String>(); annotationOne.setIdsOfCoveredDiscrepancies(idsOfCoveredDisc); dispoConnector.connectAnnotation(annotationOne, dispoItem.getDiscrepanciesList()); List<DispoAnnotationData> annotationsList = new ArrayList<DispoAnnotationData>(); annotationsList.add(annotationOne); dispoItem.setAnnotationsList(annotationsList); List<String> idsOfCoveredDiscrepancies = annotationOne.getIdsOfCoveredDiscrepancies(); Assert.assertTrue(idsOfCoveredDiscrepancies.size() == idsSize); for (int i = 0; i < idsOfCoveredDiscrepancies.size(); i++) { if (i < 5) { assertEquals(idsOfCoveredDiscrepancies.get(i), idsForDiscrepancies1_5[i]); } else if (i < 12) { assertEquals(idsOfCoveredDiscrepancies.get(i), idsForDiscrepancies12_18[i - 5]); } else { assertEquals(idsOfCoveredDiscrepancies.get(i), id20); } } assertTrue(annotationOne.getIsConnected()); String actual = dispoConnector.getItemStatus(dispoItem); assertEquals(DispoStrings.Item_Analyzed, actual); }