@Test
public void testExtractEntities() {

    DateTime date = DateTime.now().withZone(DateTimeZone.UTC);
    String mentionName = "jane";
    String userId = "1";
    String roomId = "100";
    String ent1 = "Jane Doe";
    String ent2 = "Mount Everest";
    Message msg = new Message(date, mentionName, userId,
                              String.format("Today, %s is going to climb %s", ent1, ent2),
                              roomId, MessageType.MESSAGE);
    FatMessage fatMessage = new FatMessage(msg, user, room);
    List<ChatEntity> entities = underTest.extractEntities(fatMessage);
    Map<String, ChatEntity> entitiesMap = Maps.newHashMapWithExpectedSize(entities.size());
    entities.forEach((entity) -> entitiesMap.put(entity.getValue(), entity));
    assertEquals(2, entities.size());
    ChatEntity entity = entitiesMap.get(ent1);
    assertEquals(ent1, entity.getValue());
    assertEquals(1, entity.getOccurrences());
    assertEquals(date, entity.getMentionTime());
    entity = entitiesMap.get(ent2);
    assertEquals(ent2, entity.getValue());
    assertEquals(1, entity.getOccurrences());
    assertEquals(date, entity.getMentionTime());
}