@Test
public void testRemote() {

    // given
    Mockito.when(event.getRemoteHost()).thenReturn("host");
    Mockito.when(event.getRemoteUser()).thenReturn("user");
    Mockito.when(event.getRemoteAddr()).thenReturn("addr");
    // when
    final BasicDBObject dbObject = appender.toMongoDocument(event);
    // then
    BasicDBObject remoteDBObject = (BasicDBObject) dbObject.get("remote");
    assertEquals("host", remoteDBObject.getString("host"));
    assertEquals("user", remoteDBObject.getString("user"));
    assertEquals("addr", remoteDBObject.getString("addr"));
}