PathMetadataDynamoDBTranslation { static PrimaryKey pathToKey(Path path) { Preconditions.checkArgument(!path.isRoot(), "Root path is not mapped to any PrimaryKey"); return new PrimaryKey(PARENT, pathToParentKey(path.getParent()), CHILD, path.getName()); } private  PathMetadataDynamoDBTranslation();   }
@Test public void testPathToKey() throws Exception { LambdaTestUtils.intercept(IllegalArgumentException.class, new Callable<PrimaryKey>() { @Override public PrimaryKey call() throws Exception { return pathToKey(new Path("/")); } }); doTestPathToKey(TEST_DIR_PATH); doTestPathToKey(TEST_FILE_PATH); }