@Test
public void parseChangeBuildId() {

  String line =
    "AGPBI: {\"kind\":\"error\",\"text\":\"Error message.\",\"sources\":[{}],\"original\":\"Error line 1\\nError line 2\\nError line 3\",\"tool\":\"Dex\"}";
  when(myReader.getParentEventId()).thenReturn("BUILD_ID_MOCK_1");
  String[] detailLines = new String[4];
  detailLines[0] = "Error line 1";
  detailLines[1] = "Error line 2";
  detailLines[2] = "Error line 3";
  detailLines[3] = "Unrelated output";
  assertTrue(myParser.parse(line, myReader, myConsumer));
  when(myReader.getParentEventId()).thenReturn("BUILD_ID_MOCK_2");
  assertFalse(myParser.parse(detailLines[0], myReader, myConsumer));
  when(myReader.getParentEventId()).thenReturn("BUILD_ID_MOCK_3");
  assertFalse(myParser.parse(detailLines[1], myReader, myConsumer));
  when(myReader.getParentEventId()).thenReturn("BUILD_ID_MOCK_1");
  assertTrue(myParser.parse(detailLines[2], myReader, myConsumer));
  assertFalse(myParser.parse(detailLines[3], myReader, myConsumer));
}