assertFalse(oldMan.hashCode() == newMan.hashCode());
assertFalse(newMan.hashCode() == man.hashCode());
}
public void testHighLevelCheating() {
MutablePicoContainer pico = new DefaultPicoContainer(createComponentAdapterFactory());
// Register two classes with mutual dependencies in the constructor (!!!)
pico.registerComponentImplementation(Wife.class);
pico.registerComponentImplementation(Husband.class);
Woman wife = (Woman) pico.getComponentInstance(Wife.class);
Man man = (Man) pico.getComponentInstance(Husband.class);
assertSame(man, wife.getMan());
assertSame(wife, man.getWoman());
// Let the wife use another (single) man