/** * Tests that a invocation on a SFSB method annotated with @Remove results in the removal of the * bean instance */ @Test public void testSimpleRemoveOnSFSB() { // remove the SFSB sfsbWithRemoveMethods.remove(); // try invoking again. we should expect a NoSuchEJBException try { sfsbWithRemoveMethods.remove(); Assert.fail("SFSB was expected to be removed after a call to the @Remove method"); } catch (NoSuchEJBException nsee) { // expected log.info("Got the expected NoSuchEJBException after invoking remove on the SFSB"); } }