@Test
public void testEquals() {

  TypedRange<String> range1a = new TypedRange<String>(123, 456, "hi mom");
  Assert.assertEquals(range1a, range1a); // identity case
  TypedRange<String> range1b = new TypedRange<String>(123, 456, "hi mom");
  Assert.assertEquals(range1a, range1b); // equality case
  Assert.assertNotEquals(range1a, new TypedRange<String>(123 + 1, 456, "hi mom")); // offset
  Assert.assertNotEquals(range1a, new TypedRange<String>(123, 456 + 1, "hi mom")); // length
  Assert.assertNotEquals(range1a, new TypedRange<String>(123, 456, "foo")); // metadata
  Assert.assertNotEquals(range1a, new TypedRange<String>(123, 456, null)); // no metadata
  Assert.assertNotEquals(new TypedRange<String>(123, 456, null), range1a); // other code branch
  Assert.assertEquals(
      new TypedRange<String>(123, 456, null),
      new TypedRange<String>(123, 456, null)); // both with null metadata
  Assert.assertNotEquals(range1a, null); // versus null
  Assert.assertNotEquals(range1a, "space channel 5"); // versus object of different class
}