CugUtil implements CugConstants { static boolean isSupportedPath(@Nullable String oakPath, @NotNull Set<String> supportedPaths) { if (oakPath == null) { return false; } else { for (String supportedPath : supportedPaths) { if (Text.isDescendantOrEqual(supportedPath, oakPath)) { return true; } } } return false; } private  CugUtil();   }
@Test public void testIsSupportedPath() { Set<String> configuredPaths = CUG_CONFIG.getConfigValue(PARAM_CUG_SUPPORTED_PATHS, ImmutableSet.of()); assertFalse(CugUtil.isSupportedPath(null, configuredPaths)); assertFalse(CugUtil.isSupportedPath(UNSUPPORTED_PATH, configuredPaths)); assertTrue(CugUtil.isSupportedPath(SUPPORTED_PATH, configuredPaths)); assertTrue(CugUtil.isSupportedPath(SUPPORTED_PATH2, configuredPaths)); assertTrue(CugUtil.isSupportedPath(SUPPORTED_PATH + "/child", configuredPaths)); assertTrue(CugUtil.isSupportedPath(SUPPORTED_PATH2 + "/child", configuredPaths)); }