### Question:
StringKey implements Key<T> { @Override public int compareTo(Key otherKey) { return Bytes.compareTo(this.toBytes(), otherKey.toBytes()); } @SuppressWarnings("WeakerAccess") // Used by generated Entities  StringKey(final String keyString); @Override byte[] toBytes(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); @Override int compareTo(Key otherKey);  }### Answer:
@Test public void testCompareToReturnsZeroValueWhenByteValueOfKeyIsEqualToOther() { final Key<Entity> a = new StringKey<>("hello"); final Key<Entity> b = new StringKey<>("hello"); assertEquals(0, a.compareTo(b)); }
@Test public void testCompareToReturnsPositiveValueWhenByteValueOfKeyIsGreaterThanOther() { final Key<Entity> a = new StringKey<>("hello"); final Key<Entity> b = new StringKey<>("goodbye"); assertTrue(0 < a.compareTo(b)); }
@Test public void testCompareToReturnsNegativeValueWhenByteValueOfKeyIsLessThanOther() { final Key<Entity> a = new StringKey<>("hello"); final Key<Entity> b = new StringKey<>("hello there"); assertTrue(0 > a.compareTo(b)); }