*/
public void testManaged() throws Exception
{
Registry r = buildFrameworkRegistry("Pooled.xml");
StringHolder s =
(StringHolder) r.getService("hivemind.test.services.Managed", StringHolder.class);
interceptLogging("hivemind.test.services.Managed");
assertNull(s.getValue());
assertLoggedMessage("activateService()");
s.setValue("funky monkey");
assertEquals("funky monkey", s.getValue());
ThreadEventNotifier n =
(ThreadEventNotifier) r.getService(
HiveMind.THREAD_EVENT_NOTIFIER_SERVICE,
ThreadEventNotifier.class);
n.fireThreadCleanup();
assertLoggedMessage("passivateService()");
assertNull(s.getValue());
}