public void tearDown() throws Exception {
   MBeanUtil.unregisterMBeans();
   correlationId = null;
   transactionId = null;
   inputMessage = null;
   mockInitializer = null;
   mockNotificationDispatcher = null;
   super.tearDown();
 }
 public void setUp() throws Exception {
   mockInitializer = mock(Initializer.class);
   mockPropertyManager = mock(PropertyManager.class);
   mockNotificationDispatcher = mock(NotificationDispatcher.class);
   mockTransactionRegistryManager = mock(TransactionRegistryManager.class);
   mockTransactionParticipantManager = mock(TransactionParticipantManager.class);
   mockTransactionSynchronizationRegistry = mock(TransactionSynchronizationRegistry.class);
   BeanContext.set(getModule() + ".initializer", mockInitializer);
   BeanContext.set(getModule() + ".propertyManager", mockPropertyManager);
   BeanContext.set(getDomain() + ".notificationDispatcher", mockNotificationDispatcher);
   BeanContext.set(getDomain() + ".jaxbSessionCache", new JAXBSessionCache(getDomain()));
   if (getMockServiceContext() != null)
     FieldUtil.setFieldValue(
         getMockServiceContext(), "transactionRegistryManager", mockTransactionRegistryManager);
   when(mockPropertyManager.get("aries.port.rmi")).thenReturn("1098");
   MBeanServer mbeanServer = MBeanServerFactory.createMBeanServer();
   MBeanUtil.setMBeanServer(mbeanServer);
   setGlobalTransactionActive(false);
   super.setUp();
 }