@Test
public void returnsPostsFromFeed() {

    String userId = "userId";
    Post post = mock(Post.class);
    when(post.getUserId()).thenReturn(userId);
    User user = mock(User.class);
    List<Post> posts = Arrays.asList(post);
    Map<String, User> userMap = new HashMap<>();
    userMap.put(userId, user);
    PostListFeed feed = new PostListFeed();
    feed.posts = posts;
    feed.users = userMap;
    PostFeedToList converter = new PostFeedToList();
    List<Post> result = converter.call(feed);
    assertThat(result, equalTo(posts));
}