ContentRange { public long length() { return this.last - this.first + 1; } ContentRange(long first, long last); long first(); long last(); long length(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testLength() { assertEquals(2, new ContentRange(1, 2).length()); }
@Test public void testLengthSingle() { assertEquals(1, new ContentRange(2, 2).length()); }