@Test
public void testAddEvent() throws Exception {

    setMockResponse(201, POST_EVENT_SUCCESS);
    client.addEvent(TEST_COLLECTION, TEST_EVENTS.get(0));
    ArgumentCaptor<Request> capturedRequest = ArgumentCaptor.forClass(Request.class);
    verify(mockHttpHandler).execute(capturedRequest.capture());
    assertThat(capturedRequest.getValue().url.toString(), startsWith("https://api.keen.io"));
}