TypedRange implements Comparable<TypedRange<T>> { @Override public String toString() { return "offset " + offset + ", length " + length + ", metadata " + metadata; } TypedRange(long offset, long length, T metadata); @Override String toString(); long getOffset(); long getLength(); T getMetadata(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(TypedRange<T> other);  }
@Test public void testToString() { TypedRange<String> range = new TypedRange<String>(555, 777, "woohoo"); Assert.assertNotNull(range.toString()); Assert.assertFalse(range.toString().length() == 0); }