loader.initXAResourceProducers(p);
Map dataSources = loader.getResources();
assertEquals(2, dataSources.size());
PoolingDataSource pds = (PoolingDataSource) dataSources.get("dataSource2");
assertEquals("bitronix.tm.mock.resource.jdbc.MockitoXADataSource", pds.getClassName());
assertEquals("dataSource2", pds.getUniqueName());
assertEquals(123, pds.getMaxPoolSize());
assertEquals(3, pds.getDriverProperties().size());
pds = (PoolingDataSource) dataSources.get("some.unique.Name");
assertEquals("bitronix.tm.mock.resource.jdbc.MockitoXADataSource", pds.getClassName());
assertEquals("some.unique.Name", pds.getUniqueName());
assertEquals(123, pds.getMaxPoolSize());
assertEquals(true, pds.getDeferConnectionRelease());
assertEquals(true, pds.getAutomaticEnlistingEnabled());
assertEquals(true, pds.getUseTmJoin());
assertEquals(0, pds.getDriverProperties().size());
}