@Test public void testRootEntry() { HMSPaths.Entry root = HMSPaths.Entry.createRoot(false); root.toString(); Assert.assertNull(root.getParent()); Assert.assertEquals(HMSPaths.EntryType.DIR, root.getType()); Assert.assertTrue(root.getAuthzObjsSize() == 0); Assert.assertTrue(root.isAuthzObjsEmpty()); Assert.assertTrue(root.getAuthzObjs().size() == 0); Assert.assertEquals(Path.SEPARATOR, root.getFullPath()); Assert.assertFalse(root.hasChildren()); root.delete(); try { root.find(null, true); Assert.fail(); } catch (IllegalArgumentException ex) { } try { root.find(new String[0], true); Assert.fail(); } catch (IllegalArgumentException ex) { } try { root.find(null, false); Assert.fail(); } catch (IllegalArgumentException ex) { } try { root.find(new String[0], false); Assert.fail(); } catch (IllegalArgumentException ex) { } Assert.assertNull(root.find(new String[]{"a"}, true)); Assert.assertNull(root.find(new String[]{"a"}, false)); Assert.assertNull(root.findPrefixEntry(Lists.newArrayList("a"))); root.delete(); }
@Override public String toString() { return String.format("%s:%s", getClass().getSimpleName(), Arrays.toString(prefixes)); }
HMSPaths implements AuthzPaths { @Override public String toString() { return String.format("%s:%s", getClass().getSimpleName(), Arrays.toString(prefixes)); } }
HMSPaths implements AuthzPaths { @Override public String toString() { return String.format("%s:%s", getClass().getSimpleName(), Arrays.toString(prefixes)); } HMSPaths();  HMSPaths(String[] pathPrefixes); }
HMSPaths implements AuthzPaths { @Override public String toString() { return String.format("%s:%s", getClass().getSimpleName(), Arrays.toString(prefixes)); } HMSPaths();  HMSPaths(String[] pathPrefixes); @Override Set<String> findAuthzObject(String[] pathElements); @Override Set<String> findAuthzObjectExactMatches(String[] pathElements); Set<String> findAuthzObject(String[] pathElements, boolean isPartialOk); @Override boolean isUnderPrefix(String[] pathElements); Collection<Entry> getAllEntries(); @Override HMSPathsDumper getPathsDump(); @Override String toString(); String dumpContent(); }
HMSPaths implements AuthzPaths { @Override public String toString() { return String.format("%s:%s", getClass().getSimpleName(), Arrays.toString(prefixes)); } HMSPaths();  HMSPaths(String[] pathPrefixes); @Override Set<String> findAuthzObject(String[] pathElements); @Override Set<String> findAuthzObjectExactMatches(String[] pathElements); Set<String> findAuthzObject(String[] pathElements, boolean isPartialOk); @Override boolean isUnderPrefix(String[] pathElements); Collection<Entry> getAllEntries(); @Override HMSPathsDumper getPathsDump(); @Override String toString(); String dumpContent();  }