@Test
public void populatesUsersToEvents() {

    String id = "userId";
    Event event = mock(Event.class);
    List<Event> events = Arrays.asList(event);
    when(event.getUserId()).thenReturn(id);
    Map<String, User> users = new HashMap<>();
    User user = mock(User.class);
    users.put(id, user);
    EventListFeed feed = new EventListFeed();
    feed.events = events;
    feed.users = users;
    feed.posts = new HashMap<>();
    feed.flatten();
    verify(event).setUser(user);
}