public void testLowLevelCheating() {
ComponentAdapterFactory caf = createComponentAdapterFactory();
DefaultPicoContainer pico = new DefaultPicoContainer(caf);
CachingComponentAdapter wifeAdapter = (CachingComponentAdapter) caf.createComponentAdapter("wife", Wife.class, null);
CachingComponentAdapter husbandAdapter = (CachingComponentAdapter) caf.createComponentAdapter("husband", Husband.class, null);
pico.registerComponent(wifeAdapter);
pico.registerComponent(husbandAdapter);
Woman wife = (Woman) wifeAdapter.getComponentInstance(pico);
Man wifesMan = wife.getMan();
wifesMan.kiss();
Man man = (Man) husbandAdapter.getComponentInstance(pico);
assertTrue(man.wasKissed());
assertSame(man, wife.getMan());
assertSame(wife, man.getWoman());