@Test
public void testGetEntity() throws Exception {

  WebResource r = resource();
  ClientResponse response = r.path("ws").path("v1").path("timeline")
      .path("type_1").path("id_1")
      .accept(MediaType.APPLICATION_JSON)
      .get(ClientResponse.class);
  assertEquals(MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8,
      response.getType().toString());
  TimelineEntity entity = response.getEntity(TimelineEntity.class);
  Assert.assertNotNull(entity);
  Assert.assertEquals("id_1", entity.getEntityId());
  Assert.assertEquals("type_1", entity.getEntityType());
  Assert.assertEquals(123l, entity.getStartTime().longValue());
  Assert.assertEquals(2, entity.getEvents().size());
  Assert.assertEquals(4, entity.getPrimaryFilters().size());
  Assert.assertEquals(4, entity.getOtherInfo().size());
}