@Test
public void testSetUserTransaction() throws Exception {

    initializeJtaObjectConfig();
    JtaConfigurer configurer = new JtaConfigurer();
    UserTransaction newMockUserTransaction = mock(UserTransaction.class);
    configurer.setUserTransaction(newMockUserTransaction);
    configurer.afterPropertiesSet();
    assertNotSame(newMockUserTransaction, userTransaction);
    assertEquals(newMockUserTransaction, Jta.getUserTransaction());
    assertEquals(transactionManager, Jta.getTransactionManager());
}