@Test(expected = CougarFrameworkException.class) public void testDoubleRegistration() { IdentityResolverFactory factory = new IdentityResolverFactory(); factory.setIdentityResolver(new TestIdentityResolver()); factory.setIdentityResolver(new TestIdentityResolver()); }
public void setIdentityResolver(IdentityResolver identityResolver) { if (this.identityResolver != null && identityResolver != null) { throw new CougarFrameworkException("IdentityResolver is immutable!"); } this.identityResolver = identityResolver; }
IdentityResolverFactory { public void setIdentityResolver(IdentityResolver identityResolver) { if (this.identityResolver != null && identityResolver != null) { throw new CougarFrameworkException("IdentityResolver is immutable!"); } this.identityResolver = identityResolver; } }
IdentityResolverFactory { public void setIdentityResolver(IdentityResolver identityResolver) { if (this.identityResolver != null && identityResolver != null) { throw new CougarFrameworkException("IdentityResolver is immutable!"); } this.identityResolver = identityResolver; }  }
IdentityResolverFactory { public void setIdentityResolver(IdentityResolver identityResolver) { if (this.identityResolver != null && identityResolver != null) { throw new CougarFrameworkException("IdentityResolver is immutable!"); } this.identityResolver = identityResolver; }  IdentityResolver getIdentityResolver(); void setIdentityResolver(IdentityResolver identityResolver); }
IdentityResolverFactory { public void setIdentityResolver(IdentityResolver identityResolver) { if (this.identityResolver != null && identityResolver != null) { throw new CougarFrameworkException("IdentityResolver is immutable!"); } this.identityResolver = identityResolver; }  IdentityResolver getIdentityResolver(); void setIdentityResolver(IdentityResolver identityResolver);  }