if (LOG.isDebugEnabled()) {
LOG.debug("Beginning Test ---> testRouteboxDirectAsyncRequests()");
}
Book book = new Book("Sir Arthur Conan Doyle", "The Adventures of Sherlock Holmes");
String response = sendAddToCatalogRequest(template, routeboxUri, "addToCatalog", book);
assertEquals("Book with Author " + book.getAuthor() + " and title " + book.getTitle() + " added to Catalog", response);
// Wait for 2 seconds before a follow-on request if the requests are sent in async mode
// to allow the earlier request to take effect
//Thread.sleep(2000);
book = (Book) sendFindBookRequest(template, routeboxUri, "findBook", "Sir Arthur Conan Doyle");
if (LOG.isDebugEnabled()) {
LOG.debug("Received book with author " + book.getAuthor() + " and title " + book.getTitle());
}
assertEquals("The Adventures of Sherlock Holmes", book.getTitle());
if (LOG.isDebugEnabled()) {
LOG.debug("Completed Test ---> testRouteboxDirectAsyncRequests()");
}
context.stop();