@Test
public void messageArrivedShouldLogIfUnableToFindNecessaryDetailsInMessage() {

    privateMessageParser.messageArrived("Error", "192.168.1.2");
    final ArgumentCaptor<Exception> exceptionCaptor = ArgumentCaptor.forClass(Exception.class);
    verify(log).log(eq(Level.SEVERE),
                    eq("Failed to parse message. message=Error, ipAddress=192.168.1.2"),
                    exceptionCaptor.capture());
    // String index out of range: -1 - but different on JDK 11
    checkException(exceptionCaptor, StringIndexOutOfBoundsException.class, null);
}