PathMetadataDynamoDBTranslation { static Collection<AttributeDefinition> attributeDefinitions() { return Arrays.asList( new AttributeDefinition(PARENT, ScalarAttributeType.S), new AttributeDefinition(CHILD, ScalarAttributeType.S)); } private  PathMetadataDynamoDBTranslation(); @VisibleForTesting static String pathToParentKey(Path path);  }
@Test public void testAttributeDefinitions() { final Collection<AttributeDefinition> attrs = PathMetadataDynamoDBTranslation.attributeDefinitions(); assertNotNull(attrs); assertEquals("There should be HASH and RANGE attributes", 2, attrs.size()); for (AttributeDefinition definition : attrs) { assertThat(definition.getAttributeName(), anyOf(is(PARENT), is(CHILD))); assertEquals(S.toString(), definition.getAttributeType()); } }