@Test
public void shouldReturnJsonObject() throws Exception {

    final JsonObject jsonObject = metadata.asJsonObject();
    with(jsonObject.toString())
            .assertEquals(ID, UUID_ID)
            .assertEquals(NAME, MESSAGE_NAME)
            .assertEquals(SOURCE, SOURCE_NAME)
            .assertEquals(CORRELATION + "." + CLIENT_ID, UUID_CLIENT_CORRELATION)
            .assertEquals(CAUSATION + "[0]", UUID_CAUSATION)
            .assertEquals(CONTEXT + "." + USER_ID, UUID_USER_ID)
            .assertEquals(CONTEXT + "." + SESSION_ID, UUID_SESSION_ID)
            .assertEquals(STREAM + "." + STREAM_ID, UUID_STREAM_ID)
            .assertEquals(STREAM + "." + VERSION, 99)
            .assertEquals(EVENT + "." + EVENT_NUMBER, 10)
            .assertEquals(EVENT + "." + PREVIOUS_EVENT_NUMBER, 9);
}