public void testUowManagerAndUserTransactionFoundInJndi() throws Exception {
UserTransaction ut = mock(UserTransaction.class);
given(ut.getStatus()).willReturn( Status.STATUS_NO_TRANSACTION, Status.STATUS_ACTIVE, Status.STATUS_ACTIVE);
MockUOWManager manager = new MockUOWManager();
ExpectedLookupTemplate jndiTemplate = new ExpectedLookupTemplate();
jndiTemplate.addObject(WebSphereUowTransactionManager.DEFAULT_USER_TRANSACTION_NAME, ut);
jndiTemplate.addObject(WebSphereUowTransactionManager.DEFAULT_UOW_MANAGER_NAME, manager);
WebSphereUowTransactionManager ptm = new WebSphereUowTransactionManager();
ptm.setJndiTemplate(jndiTemplate);
ptm.afterPropertiesSet();
DefaultTransactionDefinition definition = new DefaultTransactionDefinition();