replay();
// BigDecimal is arbitrary, any class would do.
ModuleDef md = new DefaultModuleDefImpl(SimpleModule.class, log);
Set<String> ids = md.getServiceIds();
assertEquals(ids.size(), 3);
assertTrue(ids.contains("ioc.Fred"));
assertTrue(ids.contains("ioc.Barney"));
assertTrue(ids.contains("ioc.Wilma"));
ServiceDef sd = md.getServiceDef("ioc.Fred");
assertEquals(sd.getServiceId(), "ioc.Fred");
assertEquals(sd.getServiceInterface(), FieService.class);
assertEquals(sd.toString(), className + ".buildFred()");
assertEquals(sd.getServiceLifeycle(), IOCConstants.DEFAULT_LIFECYCLE);
assertEquals(sd.isPrivate(), false);
assertEquals(sd.isEagerLoad(), false);
sd = md.getServiceDef("ioc.Barney");
assertEquals(sd.getServiceId(), "ioc.Barney");
assertEquals(sd.getServiceInterface(), FoeService.class);
assertEquals(sd.toString(), className + ".buildBarney()");
assertEquals(sd.getServiceLifeycle(), "threaded");
assertEquals(sd.isPrivate(), true);
sd = md.getServiceDef("ioc.Wilma");
assertEquals(sd.isEagerLoad(), true);
// Now the decorator method.
Set<DecoratorDef> defs = md.getDecoratorDefs();
assertEquals(defs.size(), 1);
DecoratorDef dd = defs.iterator().next();