@Test
public void testParseWarningFromOutput() {

  String line = "WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation'.";
  String expected = "Configuration 'compile' is obsolete and has been replaced with 'implementation'.";
  when(myReader.getParentEventId()).thenReturn("BUILD_ID_MOCK");
  ArgumentCaptor<MessageEvent> messageCaptor = ArgumentCaptor.forClass(MessageEvent.class);
  assertTrue(myParser.parse(line, myReader, myConsumer));
  verify(myConsumer).accept(messageCaptor.capture());
  List<MessageEvent> generatedMessages = messageCaptor.getAllValues();
  assertThat(generatedMessages).hasSize(1);
  assertThat(generatedMessages.get(0)).isInstanceOf(MessageEventImpl.class);
  MessageEventImpl fileMessageEvent = (MessageEventImpl)generatedMessages.get(0);
  assertThat(fileMessageEvent.getResult().getDetails()).isEqualTo(expected);
}