@Test
public void testGetEntity() throws Exception {

  context.setEntityType(TimelineEntityType.YARN_APPLICATION.toString());
  timelineReader.serviceInit(conf);
  TimelineDataToRetrieve dataToRetrieve = new TimelineDataToRetrieve();
  EnumSet<TimelineReader.Field> fieldsToRetrieve = EnumSet.noneOf(
      TimelineReader.Field.class);
  dataToRetrieve.setFieldsToRetrieve(fieldsToRetrieve);
  TimelineEntity timelineEntity = timelineReader.getEntity(context,
      dataToRetrieve);
  Assert.assertEquals(appTimelineEntity.getCreatedTime(), timelineEntity
      .getCreatedTime().longValue());
  Assert.assertEquals(0, timelineEntity .getMetrics().size());
  Assert.assertEquals(0, timelineEntity.getEvents().size());
  Assert.assertEquals(0, timelineEntity.getConfigs().size());
  Assert.assertEquals(appTimelineEntity.getInfo().size(),
      timelineEntity.getInfo().size());
}