AppNews implements Parcelable { public boolean hasLinks() { return mLinks != null && !mLinks.isEmpty(); }  @Override boolean equals(final Object o); String getBody(); SimpleDate getDate(); long getEpoch(); String getHead(); String getId(); @Nullable ArrayList<Link> getLinks(); @Override int hashCode(); boolean hasLinks(); boolean isImportant(); @Override String toString(); @Override int describeContents(); @Override void writeToParcel(final Parcel dest, final int flags); static final Creator<AppNews> CREATOR; }
@Test public void testHasLinks() throws Exception { assertFalse(mAppNews.get(0).hasLinks()); assertTrue(mAppNews.get(1).hasLinks()); }