### Question:
ZonedTimeIndexKey extends NativeIndexSingleValueKey<ZonedTimeIndexKey> { @Override public int compareValueTo( ZonedTimeIndexKey other ) { int compare = Long.compare( nanosOfDayUTC, other.nanosOfDayUTC ); if ( compare == 0 ) { compare = Integer.compare( zoneOffsetSeconds, other.zoneOffsetSeconds ); } return compare; }  @Override Value asValue(); @Override void initValueAsLowest( ValueGroup valueGroups ); @Override void initValueAsHighest( ValueGroup valueGroups ); @Override int compareValueTo( ZonedTimeIndexKey other ); @Override String toString(); @Override void writeTime( long nanosOfDayUTC, int offsetSeconds );  }### Answer:
@Test public void compareToSameAsValue() { Value[] values = {TimeValue.time( 9999, ZoneOffset.of( "+18:00" ) ), TimeValue.time( 10000, ZoneOffset.of( "-18:00" ) ), TimeValue.time( 10000, ZoneOffset.of( "-00:00" ) ), TimeValue.time( 10000, ZoneOffset.of( "+01:00" ) ), TimeValue.time( 10000, ZoneOffset.of( "+03:00" ) ), TimeValue.time( 10000, ZoneOffset.of( "-18:00" ) )}; ZonedTimeIndexKey keyI = new ZonedTimeIndexKey(); ZonedTimeIndexKey keyJ = new ZonedTimeIndexKey(); for ( Value vi : values ) { for ( Value vj : values ) { vi.writeTo( keyI ); vj.writeTo( keyJ ); int expected = Values.COMPARATOR.compare( vi, vj ); assertEquals( format( "comparing %s and %s", vi, vj ), expected, keyI.compareValueTo( keyJ ) ); } } }