SourceLoader unprivilegedLoader = new UnprivilegedSourceLoader();
List<SourceLoader> loaders = Lists.newArrayList(friendlyLoader, selectiveLoader, unprivilegedLoader);
SourceFactory sf = new SourceFactory(loaders);
assertEquals(Sets.newHashSet("VIP", "Guest", "Friend1", "Friend2", "Custom_1","Custom_2"), sf.getNamespaces());
ConfigAdapter c = Aura.getConfigAdapter();
//Assert namespaces of PrivilegedNamespaceSourceLoaders are privileged based on isPrivilegedNamespace()
assertTrue(c.isPrivilegedNamespace("Friend1"));
assertTrue(c.isPrivilegedNamespace("Friend2"));
assertTrue(c.isPrivilegedNamespace("VIP"));
assertFalse(c.isPrivilegedNamespace("Guest"));
//Assert namspaces of non-PrivilegedNamespaceSourceLoaders are not privileged
assertFalse(c.isPrivilegedNamespace("Custom_1"));
assertFalse(c.isPrivilegedNamespace("Custom_2"));
}