@Test public void test_invalid_resourceHierarchies_with_leaf_specification() { RangerResourceDef Database = createResourceDef("Database", "", false); RangerResourceDef UDF = createResourceDef("UDF", "Database"); RangerResourceDef Table = createResourceDef("Table", "Database", true); RangerResourceDef Column = createResourceDef("Column", "Table", false); RangerResourceDef Table_Attribute = createResourceDef("Table-Attribute", "Table", true); List<RangerResourceDef> resourceDefs = Lists.newArrayList(Column, Database, Table, Table_Attribute, UDF); when(_serviceDef.getResources()).thenReturn(resourceDefs); _helper = new RangerServiceDefHelper(_serviceDef); assertFalse(_helper.isResourceGraphValid()); }
public boolean isResourceGraphValid() { return _delegate.isResourceGraphValid(); }
RangerServiceDefHelper { public boolean isResourceGraphValid() { return _delegate.isResourceGraphValid(); } }
RangerServiceDefHelper { public boolean isResourceGraphValid() { return _delegate.isResourceGraphValid(); } RangerServiceDefHelper(RangerServiceDef serviceDef);  RangerServiceDefHelper(RangerServiceDef serviceDef, boolean useCache);  RangerServiceDefHelper(RangerServiceDef serviceDef, boolean useCache, boolean checkForCycles); }
RangerServiceDefHelper { public boolean isResourceGraphValid() { return _delegate.isResourceGraphValid(); } RangerServiceDefHelper(RangerServiceDef serviceDef);  RangerServiceDefHelper(RangerServiceDef serviceDef, boolean useCache);  RangerServiceDefHelper(RangerServiceDef serviceDef, boolean useCache, boolean checkForCycles); static RangerServiceDef getServiceDefForPolicyFiltering(RangerServiceDef serviceDef); static Map<String, String> getFilterResourcesForAncestorPolicyFiltering(RangerServiceDef serviceDef, Map<String, String> filterResources); RangerServiceDef getServiceDef(); void patchServiceDefWithDefaultValues(); Set<List<RangerResourceDef>> getResourceHierarchies(Integer policyType); Set<List<RangerResourceDef>> filterHierarchies_containsOnlyMandatoryResources(Integer policyType); Set<List<RangerResourceDef>> getResourceHierarchies(Integer policyType, Collection<String> keys); boolean hierarchyHasAllResources(List<RangerResourceDef> hierarchy, Collection<String> resourceNames); Set<String> getMandatoryResourceNames(List<RangerResourceDef> hierarchy); Set<String> getAllResourceNames(List<RangerResourceDef> hierarchy); List<String> getAllResourceNamesOrdered(List<RangerResourceDef> hierarchy); boolean isResourceGraphValid(); }
RangerServiceDefHelper { public boolean isResourceGraphValid() { return _delegate.isResourceGraphValid(); } RangerServiceDefHelper(RangerServiceDef serviceDef);  RangerServiceDefHelper(RangerServiceDef serviceDef, boolean useCache);  RangerServiceDefHelper(RangerServiceDef serviceDef, boolean useCache, boolean checkForCycles); static RangerServiceDef getServiceDefForPolicyFiltering(RangerServiceDef serviceDef); static Map<String, String> getFilterResourcesForAncestorPolicyFiltering(RangerServiceDef serviceDef, Map<String, String> filterResources); RangerServiceDef getServiceDef(); void patchServiceDefWithDefaultValues(); Set<List<RangerResourceDef>> getResourceHierarchies(Integer policyType); Set<List<RangerResourceDef>> filterHierarchies_containsOnlyMandatoryResources(Integer policyType); Set<List<RangerResourceDef>> getResourceHierarchies(Integer policyType, Collection<String> keys); boolean hierarchyHasAllResources(List<RangerResourceDef> hierarchy, Collection<String> resourceNames); Set<String> getMandatoryResourceNames(List<RangerResourceDef> hierarchy); Set<String> getAllResourceNames(List<RangerResourceDef> hierarchy); List<String> getAllResourceNamesOrdered(List<RangerResourceDef> hierarchy); boolean isResourceGraphValid();  }