Program: 39804
Project: 39804
Buggy source:
@Test public void testAssembledAuthor() throws IOException {
  ExtendedRecord record=ExtendedRecordCustomBuilder.create().kingdom("String_Node_Str").genus("String_Node_Str").name("String_Node_Str").authorship("String_Node_Str").rank(Rank.SPECIES.name()).id(TEST_RECORD_ID).build();
  enqueueResponse(PUMA_CONCOLOR_RESPONSE);
  TaxonRecord taxonRecord=new TaxonRecord();
  TaxonomyInterpreter interpreter=TaxonomyInterpreter.taxonomyInterpreter(taxonRecord,WS_PROPERTIES_PATH);
  interpreter.apply(record);
  Map<Rank,RankedName> ranksResponse=taxonRecord.getClassification().stream().collect(Collectors.toMap(RankedName::getRank,rankedName -> rankedName));
  Assert.assertEquals(2435099,taxonRecord.getUsage().getKey().intValue());
  Assert.assertEquals(1,ranksResponse.get(Rank.KINGDOM).getKey().intValue());
  Assert.assertEquals("String_Node_Str",ranksResponse.get(Rank.PHYLUM).getName());
  record=ExtendedRecordCustomBuilder.create().kingdom("String_Node_Str").genus("String_Node_Str").name("String_Node_Str").rank(Rank.SPECIES.name()).id(TEST_RECORD_ID).build();
  enqueueResponse(PUMA_CONCOLOR_2_RESPONSE);
  interpreter.apply(record);
  ranksResponse=taxonRecord.getClassification().stream().collect(Collectors.toMap(RankedName::getRank,rankedName -> rankedName));
  Assert.assertEquals(2435099,taxonRecord.getUsage().getKey().intValue());
  Assert.assertEquals(1,ranksResponse.get(Rank.KINGDOM).getKey().intValue());
  Assert.assertEquals("String_Node_Str",ranksResponse.get(Rank.PHYLUM).getName());
  record=ExtendedRecordCustomBuilder.create().kingdom("String_Node_Str").genus("String_Node_Str").name("String_Node_Str").authorship("String_Node_Str").rank(Rank.SPECIES.name()).id(TEST_RECORD_ID).build();
  enqueueResponse(PUMA_CONCOLOR_3_RESPONSE);
  interpreter.apply(record);
  ranksResponse=taxonRecord.getClassification().stream().collect(Collectors.toMap(RankedName::getRank,rankedName -> rankedName));
  Assert.assertEquals(2435099,taxonRecord.getUsage().getKey().intValue());
  Assert.assertEquals(1,ranksResponse.get(Rank.KINGDOM).getKey().intValue());
  Assert.assertEquals("String_Node_Str",ranksResponse.get(Rank.PHYLUM).getName());
}

Fixed version (ground truth):
@Test public void testAssembledAuthor() throws IOException {
  ExtendedRecord record=ExtendedRecordCustomBuilder.create().kingdom("String_Node_Str").genus("String_Node_Str").name("String_Node_Str").authorship("String_Node_Str").rank(Rank.SPECIES.name()).id(TEST_RECORD_ID).build();
  enqueueResponse(PUMA_CONCOLOR_RESPONSE);
  TaxonRecord taxonRecord=new TaxonRecord();
  TaxonomyInterpreter interpreter=TaxonomyInterpreter.taxonomyInterpreter(taxonRecord,WS_PROPERTIES_PATH);
  Interpretation<ExtendedRecord> interpretation=interpreter.apply(record);
  Map<Rank,RankedName> ranksResponse=taxonRecord.getClassification().stream().collect(Collectors.toMap(RankedName::getRank,rankedName -> rankedName));
  Assert.assertNotNull(interpretation);
  Assert.assertEquals(2435099,taxonRecord.getUsage().getKey().intValue());
  Assert.assertEquals(1,ranksResponse.get(Rank.KINGDOM).getKey().intValue());
  Assert.assertEquals("String_Node_Str",ranksResponse.get(Rank.PHYLUM).getName());
  record=ExtendedRecordCustomBuilder.create().kingdom("String_Node_Str").genus("String_Node_Str").name("String_Node_Str").rank(Rank.SPECIES.name()).id(TEST_RECORD_ID).build();
  enqueueResponse(PUMA_CONCOLOR_2_RESPONSE);
  Interpretation<ExtendedRecord> interpretationPuma=interpreter.apply(record);
  ranksResponse=taxonRecord.getClassification().stream().collect(Collectors.toMap(RankedName::getRank,rankedName -> rankedName));
  Assert.assertNotNull(interpretationPuma);
  Assert.assertEquals(2435099,taxonRecord.getUsage().getKey().intValue());
  Assert.assertEquals(1,ranksResponse.get(Rank.KINGDOM).getKey().intValue());
  Assert.assertEquals("String_Node_Str",ranksResponse.get(Rank.PHYLUM).getName());
  record=ExtendedRecordCustomBuilder.create().kingdom("String_Node_Str").genus("String_Node_Str").name("String_Node_Str").authorship("String_Node_Str").rank(Rank.SPECIES.name()).id(TEST_RECORD_ID).build();
  enqueueResponse(PUMA_CONCOLOR_3_RESPONSE);
  Interpretation<ExtendedRecord> interpretationPuma2=interpreter.apply(record);
  ranksResponse=taxonRecord.getClassification().stream().collect(Collectors.toMap(RankedName::getRank,rankedName -> rankedName));
  Assert.assertNotNull(interpretationPuma2);
  Assert.assertEquals(2435099,taxonRecord.getUsage().getKey().intValue());
  Assert.assertEquals(1,ranksResponse.get(Rank.KINGDOM).getKey().intValue());
  Assert.assertEquals("String_Node_Str",ranksResponse.get(Rank.PHYLUM).getName());
}