### Question:
SortedLabels { @Override public boolean equals( Object obj ) { if ( obj instanceof SortedLabels ) { long[] input = ((SortedLabels) obj).all(); return Arrays.equals( labels, input ); } return false; } private  SortedLabels( long[] labels ); static SortedLabels from( long[] labels ); @Override int hashCode(); @Override boolean equals( Object obj ); int numberOfLabels(); Integer label( int offset );  }### Answer:
@Test void testEquals() { long[] longsA = new long[]{1L, 2L, 3L}; long[] longsB = new long[]{3L, 2L, 1L}; long[] longsC = new long[]{1L, 2L, 3L, 4L}; SortedLabels a = SortedLabels.from( longsA ); SortedLabels b = SortedLabels.from( longsB ); SortedLabels c = SortedLabels.from( longsC ); assertEquals( a, a ); assertEquals( a, b ); assertEquals( b, a ); assertNotEquals( a, c ); assertNotEquals( c, a ); }