RankableObjectWithFields implements Rankable, Serializable { public Object getObject() { return obj; } RankableObjectWithFields(Object obj, long count, Object... otherFields); static RankableObjectWithFields from(Tuple tuple); Object getObject(); long getCount(); List<Object> getFields(); @Override int compareTo(Rankable other); @Override boolean equals(Object o); @Override int hashCode(); String toString(); @Override Rankable copy();  }
@Test public void shouldReturnTheObject() { RankableObjectWithFields r = new RankableObjectWithFields(ANY_OBJECT, ANY_COUNT, ANY_FIELD); Object obj = r.getObject(); assertThat(obj).isEqualTo(ANY_OBJECT); }