Collection<DuplicateCode> annotations = parseFile(fileName);
assertEquals(ERROR_MESSAGE, 2, annotations.size());
Iterator<DuplicateCode> iterator = annotations.iterator();
DuplicateCode first = iterator.next();
DuplicateCode second = iterator.next();
assertEquals(WRONG_WARNING_PROPERTY, SOURCECODE, first.getSourceCode());
assertEquals(WRONG_WARNING_PROPERTY, SOURCECODE, second.getSourceCode());
if (first.getPrimaryLineNumber() == REPORTER_LINE) {
assertDuplication(REPORTER_LINE, REPORTER, first);
assertDuplication(PUBLISHER_LINE, PUBLISHER, second);
}