@Test public final void test_isResourceGraphValid_detectCycle() { RangerResourceDef A = createResourceDef("A", "D"); RangerResourceDef B = createResourceDef("B", "C"); RangerResourceDef C = createResourceDef("C", "D"); RangerResourceDef D = createResourceDef("D", "A"); List<RangerResourceDef> resourceDefs = Lists.newArrayList(A, B, C, D); when(_serviceDef.getResources()).thenReturn(resourceDefs); _helper = new RangerServiceDefHelper(_serviceDef); assertFalse("Graph was valid!", _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();  }