@Test
public void add_app_event_in_cache() {

    ResourceManagerEventProtos.ApplicationEvent body = createApplicationEvent();
    GarmadonMessage msgAppEvent = generateGarmadonMessage(4000, component, body);
    AppEventEnrichment appEvent = new AppEventEnrichment(msgAppEvent.getHeader().getApplicationName(), msgAppEvent.getHeader().getFramework(),
        body.getAmContainerId(), msgAppEvent.getHeader().getUsername(), body.getYarnTagsList());
    // Check that applicationId is not in the cache
    assertNull(elasticSearchCacheManager.cacheAppEvent.getIfPresent(applicationId));
    elasticSearchCacheManager.cacheEnrichableData(msgAppEvent);
    // Check that applicationId has well been inserted in the cache
    assertEquals(appEvent, elasticSearchCacheManager.cacheAppEvent.getIfPresent(applicationId));
    assertEquals(1, elasticSearchCacheManager.cacheAppEvent.size());
}