@SpecAssertions({ @SpecAssertion(section = "7.3.2", id = "bc"), @SpecAssertion(section = "7.3.3", id = "c") })
public void testDestroyRemovesSFSB() throws Exception {
GrossStadt frankfurt = getInstanceByType(GrossStadt.class);
Bean<KleinStadt> stadtBean = getBeans(KleinStadt.class).iterator().next();
assert stadtBean != null : "Expected a bean for stateful session bean Kassel";
Context requestContext = getCurrentManager().getContext(RequestScoped.class);
CreationalContext<KleinStadt> creationalContext = getCurrentManager().createCreationalContext(stadtBean);
KleinStadt kassel = stadtBean.create(creationalContext);
kassel.ping();
stadtBean.destroy(kassel, creationalContext);
assert frankfurt.isKleinStadtDestroyed() : "Expected SFSB bean to be destroyed";
kassel = requestContext.get(stadtBean);
assert kassel == null : "SFSB bean should not exist after being destroyed";
// frankfurt.dispose();
}