	@Test
	public void testSuccessAll() throws ResourceException, IllegalStateException, RollbackException, SystemException {

		
		CommitRollbackCallback callback = new CommitRollbackCallback() {
			private static final long serialVersionUID = 1L;
			@Override
			public void rollback(String txid) throws Exception {
			}
			@Override
			public void commit(String txid) throws Exception {
			}
		};
		final UserTransactionManager tm = mock(UserTransactionManager.class);
		when(tm.getStatus()).thenReturn(Status.STATUS_ACTIVE);
		Transaction tx = mock(Transaction.class);
		when(tm.getTransaction()).thenReturn(tx);

		//TEST
		TransactionConfigurator.setup("a", callback);
		
		BasicTransactionAssistanceFactory f = new BasicTransactionAssistanceFactoryImpl("a"){
			@Override
			protected UserTransactionManager getTM() {
				return tm;
			}
		};

		//TEST
		f.getTransactionAssistant();

		//ensure its enlisted
		ArgumentCaptor<XAResource> c = ArgumentCaptor.forClass(XAResource.class);
		verify(tx).enlistResource(c.capture());
		assertEquals(MicroserviceXAResource.class, c.getValue().getClass());
		assertEquals("a", ((MicroserviceXAResource)c.getValue()).getJndiName());
		
		TransactionConfigurator.unregisterMicroserviceResourceFactory("a");
		
		assertNull(TransactionConfigurator.getCommitRollbackCallback("a"));
	}