int size = expected ? 1 : 0;
assertEquals("Could not find destination: " + destination + ". Size of found destinations: " + answer, size, answer.size());
}
protected BrokerService createBroker() throws Exception {
XBeanBrokerFactory factory = new XBeanBrokerFactory();
BrokerService answer = factory.createBroker(new URI(getBrokerConfigUri()));
// lets disable persistence as we are a test
answer.setPersistent(false);
return answer;