@Test
public void messageArrivedShouldLogIfUnableToParseUserCodeInMessage() {

    privateMessageParser.messageArrived("a12516938!PRIVMSG#12516938:(18737868)[-6750208]hello", "192.168.1.2");
    final ArgumentCaptor<Exception> exceptionCaptor = ArgumentCaptor.forClass(Exception.class);
    verify(log).log(eq(Level.SEVERE),
                    eq("Failed to parse message. " +
                               "message=a12516938!PRIVMSG#12516938:(18737868)[-6750208]hello, " +
                               "ipAddress=192.168.1.2"),
                    exceptionCaptor.capture());
    checkException(exceptionCaptor, NumberFormatException.class, "For input string: \"a12516938\"");
}