pico.registerComponentImplementation("hasMixin1", OrderEntityImpl.class);
pico.registerComponentImplementation("hasMixin2", OrderEntityImpl.class);
pico.registerComponentImplementation("noMixin", OrderEntityImpl.class);
pico.registerComponentImplementation(IdGenerator.class, IdGeneratorImpl.class);
Identifiable hasMixin1 = (Identifiable) pico.getComponentInstance("hasMixin1");
Identifiable hasMixin2 = (Identifiable) pico.getComponentInstance("hasMixin1");
OrderEntity noMixin = (OrderEntity) pico.getComponentInstance("noMixin");
assertFalse(noMixin instanceof Identifiable);
assertEquals(new Integer(1), hasMixin1.getId());
assertEquals(new Integer(2), hasMixin2.getId());
hasMixin1.setId(new Integer(42));
assertEquals(new Integer(42), hasMixin1.getId());
assertEquals(new Integer(2), hasMixin2.getId());
}