class EventListFeed extends FlattenableFeed<List<Event>> {

    @Override
    public List<Event> flatten() {
        if(events == null) {
            return new ArrayList<>();
        }
        for(Event event : events) {
            event.setUser(users.get(event.getUserId()));
            event.setPost(posts.get(event.getPostId()));
        }
        return events;
    }

}

class EventListFeedTest {

    @Test
    public void nullFeedReturnsEmptyList() {

        List<Event> events = new EventListFeed().flatten();

        assertThat(events, notNullValue());
    }

}