DBWildcardPrivilege implements Privilege { @VisibleForTesting protected static boolean impliesURI(String privilege, String request) { return PathUtils.impliesURI(privilege, request); } DBWildcardPrivilege(String wildcardString); @Override boolean implies(Privilege p); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testImpliesURIPositive() throws Exception { assertTrue(DBWildcardPrivilege.impliesURI("hdfs: "hdfs: assertTrue(DBWildcardPrivilege.impliesURI("hdfs: "hdfs: assertTrue(DBWildcardPrivilege.impliesURI("file: "file: assertTrue(DBWildcardPrivilege.impliesURI("file: "file: }
@Test public void testImpliesURINegative() throws Exception { assertFalse(DBWildcardPrivilege.impliesURI("hdfs: "hdfs: assertFalse(DBWildcardPrivilege.impliesURI("file: "file: assertFalse(DBWildcardPrivilege.impliesURI("blah", "hdfs: assertFalse(DBWildcardPrivilege.impliesURI("hdfs: "blah")); assertFalse(DBWildcardPrivilege.impliesURI("hdfs: "file: assertFalse(DBWildcardPrivilege.impliesURI("hdfs: "file: assertFalse(DBWildcardPrivilege.impliesURI("hdfs: "hdfs: assertFalse(DBWildcardPrivilege.impliesURI("hdfs: "hdfs: assertFalse(DBWildcardPrivilege.impliesURI("hdfs: "hdfs: assertTrue(DBWildcardPrivilege.impliesURI("hdfs: "hdfs: }