public void testConfigureService() throws Exception {
ConfigurationFactory factory = new ConfigurationFactory();
// We should be able to create a default definition
StatelessSessionContainerInfo defaultStatelessContainer = factory.configureService(StatelessSessionContainerInfo.class);
assertNotNull(defaultStatelessContainer);
assertNotNull(defaultStatelessContainer.id);
assertNotNull(defaultStatelessContainer.className);
assertNotNull(defaultStatelessContainer.constructorArgs);
assertNotNull(defaultStatelessContainer.properties);
// We should be able to create one of these with a different name
Container container = new Container("My Stateless Container");
StatelessSessionContainerInfo myStatelessContainer = factory.configureService(container, StatelessSessionContainerInfo.class);
assertNotNull(myStatelessContainer);
assertEquals("My Stateless Container", myStatelessContainer.id);
assertEquals(defaultStatelessContainer.className, myStatelessContainer.className);
assertNotNull(myStatelessContainer.constructorArgs);