}
};
thread.start();
//let's sleep for a moment to make sure the thread has acquired the lock
Thread.sleep(150);
e.cancel();
assertTrue("Exchange should have been cancelled", latch.await(1, TimeUnit.SECONDS));
assertEquals(Status.Error, e.getStatus());
}
public static Map<String, Object> createMap(String... data) {