### Question:
PointerItem extends BaseItem { public static PointerItem fromItem(Map<String, AttributeValue> item) { UuidKey partitionKey = new UuidKey(item.remove(partitionKeyName()).getS()); String sortKey = item.remove(sortKeyName()).getS(); if (!sortKey.equals(TARGET)) { throw new DataModelException( String.format("Unexpected sortKey value (%s) for PointerItem!", sortKey)); } return new PointerItem(partitionKey, item); } protected  PointerItem(UuidKey pointerTarget, Map<String, AttributeValue> context); static Map<String, Condition> filterFor(); static PointerItem generate(); static PointerItem generate(Map<String, String> context); static PointerItem fromKeyAndContext(String key, Map<String, String> context); Map<String, String> getContext(); @Override Map<String, AttributeValue> toItem(); static Map<String, AttributeValue> atKey(String key); static Map<String, AttributeValue> atKey(AttributeValue key); static PointerItem fromItem(Map<String, AttributeValue> item); Set<ContextItem> contextItems();  }### Answer:
@Test void testFromItemInvalidSortKey() { Map<String, AttributeValue> bogusItem = new HashMap<>(2); bogusItem.put(PointerItem.partitionKeyName(), new AttributeValue(new UuidKey().toString())); bogusItem.put(PointerItem.sortKeyName(), new AttributeValue("bonkers and wrong")); assertThrows( DataModelException.class, () -> { PointerItem.fromItem(bogusItem); }); }