@Test
public void testGetEntityCustomFields() throws Exception {

  // Specified fields in addition to default view will be returned.
  TimelineEntity result = reader.getEntity(
      new TimelineReaderContext("cluster1", "user1", "flow1", 1L, "app1",
      "app", "id_1"),
      new TimelineDataToRetrieve(null, null,
      EnumSet.of(Field.INFO, Field.CONFIGS, Field.METRICS), null, null,
      null));
  Assert.assertEquals(
      (new TimelineEntity.Identifier("app", "id_1")).toString(),
      result.getIdentifier().toString());
  Assert.assertEquals((Long)1425016502000L, result.getCreatedTime());
  Assert.assertEquals(3, result.getConfigs().size());
  Assert.assertEquals(3, result.getMetrics().size());
  Assert.assertEquals(2, result.getInfo().size());
  // No events will be returned
  Assert.assertEquals(0, result.getEvents().size());
}