CdiProducerDecorator implements TestMethodDecorator { @Override public void afterTest(final TestInvocation invocation) throws Exception { emh.setEntityManager(null); } CdiProducerDecorator(); @Override int getPriority(); @Override void beforeTest(final TestInvocation invocation); @Override void afterTest(final TestInvocation invocation); @Override boolean isConfigurationSupported(final ExecutionContext ctx);  }
@Test public void testAfterTest() throws Throwable { fixture.afterTest(invocation); verify(emh).setEntityManager(eq(null)); verifyNoMoreInteractions(invocation, emh, em); }