assertFalse(system.isRegistered("test"));
}
public void testRegisterClassLoaderPolicyAndConstructDomainNoDomainName()
{
MockClassLoaderSystem system = createMockClassLoaderSystem();
MockClassLoaderPolicy policy = createMockClassLoaderPolicy();
try
{
system.registerClassLoaderPolicy(null, ParentPolicy.BEFORE, ClassLoaderSystem.DEFAULT_DOMAIN_NAME, policy);
fail("Should not be here!");
}
catch (Exception e)
{
checkThrowable(IllegalArgumentException.class, e);
}
try
{
system.registerClassLoaderPolicy(null, ParentPolicy.BEFORE, policy);
fail("Should not be here!");
}
catch (Exception e)
{
checkThrowable(IllegalArgumentException.class, e);
}
try
{
system.registerClassLoaderPolicy((String) null, policy);
fail("Should not be here!");
}
catch (Exception e)
{
checkThrowable(IllegalArgumentException.class, e);