@Test
public void testSetTransactionManager() throws Exception {

    initializeJtaObjectConfig();
    JtaConfigurer configurer = new JtaConfigurer();
    TransactionManager newMockTransactionManager = mock(TransactionManager.class);
    configurer.setTransactionManager(newMockTransactionManager);
    configurer.afterPropertiesSet();
    assertNotSame(newMockTransactionManager, transactionManager);
    assertEquals(newMockTransactionManager, Jta.getTransactionManager());
    assertEquals(userTransaction, Jta.getUserTransaction());
}