ClassLoaderUtils { @Beta public boolean isBundleWhiteListed(Bundle bundle) { WhiteListBundlePredicate p = createBundleMatchingPredicate(); return p.apply(bundle); } ClassLoaderUtils(Object callingObj, Entity entity);  ClassLoaderUtils(Object callingObj, @Nullable ManagementContext mgmt);  ClassLoaderUtils(Class<?> callingClass);  ClassLoaderUtils(@Nullable ClassLoader cl);  ClassLoaderUtils(@Nullable ClassLoader cl, @Nullable ManagementContext mgmt);  ClassLoaderUtils(Class<?> callingClass, Entity entity);  ClassLoaderUtils(Class<?> callingClass, @Nullable ManagementContext mgmt); Class<?> loadClass(String name); Class<?> loadClass(String symbolicName, @Nullable String version, String className); URL getResource(String name); Iterable<URL> getResources(String name); @Beta boolean isBundleWhiteListed(Bundle bundle); @Override String toString();  }
@Test public void testIsBundleWhiteListed() throws Exception { mgmt = LocalManagementContextForTests.builder(true).enableOsgiReusable().build(); ClassLoaderUtils clu = new ClassLoaderUtils(getClass(), mgmt); assertTrue(clu.isBundleWhiteListed(getBundle(mgmt, "org.apache.brooklyn.core"))); assertTrue(clu.isBundleWhiteListed(getBundle(mgmt, "org.apache.brooklyn.api"))); assertFalse(clu.isBundleWhiteListed(getBundle(mgmt, "com.google.guava"))); }