assertEquals("all transactions are complete", 0, brokerService.getBroker().getPreparedTransactions(null).length);
}
@Test
public void testDirectoryDefault() throws Exception {
MultiKahaDBPersistenceAdapter multiKahaDBPersistenceAdapter = new MultiKahaDBPersistenceAdapter();
ArrayList<FilteredKahaDBPersistenceAdapter> adapters = new ArrayList<FilteredKahaDBPersistenceAdapter>();
FilteredKahaDBPersistenceAdapter otherFilteredKahaDBPersistenceAdapter =
new FilteredKahaDBPersistenceAdapter();
PersistenceAdapter otherStore = createStore(false);
File someOtherDisk = new File("target" + File.separator + "someOtherDisk");
otherStore.setDirectory(someOtherDisk);
otherFilteredKahaDBPersistenceAdapter.setPersistenceAdapter(otherStore);
otherFilteredKahaDBPersistenceAdapter.setDestination(new ActiveMQQueue("Other"));
adapters.add(otherFilteredKahaDBPersistenceAdapter);
FilteredKahaDBPersistenceAdapter filteredKahaDBPersistenceAdapterDefault =
new FilteredKahaDBPersistenceAdapter();
PersistenceAdapter storeDefault = createStore(false);
filteredKahaDBPersistenceAdapterDefault.setPersistenceAdapter(storeDefault);
adapters.add(filteredKahaDBPersistenceAdapterDefault);
multiKahaDBPersistenceAdapter.setFilteredPersistenceAdapters(adapters);
assertEquals(multiKahaDBPersistenceAdapter.getDirectory(), storeDefault.getDirectory().getParentFile());
assertEquals(someOtherDisk, otherStore.getDirectory().getParentFile());
}