return input.findId().equals(id);
}
}).orNull();</BUG>
}
<BUG>public List<PostEntity> getReportedPosts() {
return Lists.newArrayList(Iterables.filter(getPosts(), new Predicate<PostEntity>() {
@Override
public boolean apply(@Nullable PostEntity postEntity) {
return postEntity.isReported();
}
}));</BUG>
}

@CheckForNull
public PostEntity findNewestPost() {
return postList.isEmpty() ? null : new PostEntity(postList.get(0));
}
@CheckForNull
public PostEntity findPostById(final String id) {
return Iterables.tryFind(getPosts(), input -> input.findId().equals(id)).orNull();
}
public List<PostEntity> getReportedPosts() {
return Lists.newArrayList(getPosts().stream().filter(PostEntity::isReported)
.collect(Collectors.toList()));
}
