PathMetadataDynamoDBTranslation { static Collection<KeySchemaElement> keySchema() { return Arrays.asList( new KeySchemaElement(PARENT, KeyType.HASH), new KeySchemaElement(CHILD, KeyType.RANGE)); } private  PathMetadataDynamoDBTranslation(); @VisibleForTesting static String pathToParentKey(Path path);  }
@Test public void testKeySchema() { final Collection<KeySchemaElement> keySchema = PathMetadataDynamoDBTranslation.keySchema(); assertNotNull(keySchema); assertEquals("There should be HASH and RANGE key in key schema", 2, keySchema.size()); for (KeySchemaElement element : keySchema) { assertThat(element.getAttributeName(), anyOf(is(PARENT), is(CHILD))); assertThat(element.getKeyType(), anyOf(is(HASH.toString()), is(RANGE.toString()))); } }