@Test
public void killTheFactory() throws Exception {
assertThat(context, is(notNullValue()));
ComponentInstance ci = null;
SingletonComponentType type = createAProvider();
ci = type.create();
assertThat("Ci is valid", ci.getState(), is(ComponentInstance.VALID));
ServiceReference ref = ipojoHelper.getServiceReferenceByName(Foo.class
.getName(), ci.getInstanceName());
assertThat(ref, is(notNullValue()));
type.stop();
assertThat("Ci is disposed", ci.getState(),
is(ComponentInstance.DISPOSED));
assertThat(ipojoHelper.isServiceAvailableByName(Foo.class.getName(), ci
.getInstanceName()), is(false));
}