### Question:
BaseItem { @Override public String toString() { return this.toItem().toString(); } BaseItem(String partitionKey, String sortKey); Map<String, AttributeValue> toItem(); static String partitionKeyName(); static String sortKeyName(); AttributeValue partitionKey(); AttributeValue sortKey(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void testEqualsSameKeysDifferentKeyTypes() { UuidKey objectKey = new UuidKey(); String contextKey = "aw350m3"; ContextItem item1 = ContextItem.fromContext(contextKey, objectKey); ContextItem item2 = ContextItem.fromContext(contextKey, new AttributeValue(objectKey.toString())); assertEquals(item1, item2); }
@Test void testToStringSanity() { String contextKey = "foobaz"; UuidKey objectKey = new UuidKey(); ContextItem test = ContextItem.fromContext(contextKey, objectKey); ; assertTrue(test.toString().contains(contextKey)); assertTrue(test.toString().contains(objectKey.toString())); }