@Test
public void testAppendOn() throws Exception {

    appender.start();
    appender.doAppend("Test message");
    ArgumentCaptor<Message> messageArgumentCaptor = ArgumentCaptor.forClass(Message.class);
    verify(chat).sendMessage(messageArgumentCaptor.capture());
    Message message = messageArgumentCaptor.getValue();
    Assert.assertEquals("Test message", message.getBody());
}