// make sure all results are checked and right
assertTrue(latch.await(10, TimeUnit.SECONDS));
}
private void assertBuyStocks(Object result) {
BuyStocks buyStocks = ((BuyStocksDocument) result).getBuyStocks();
assertEquals(1, buyStocks.getOrderArray().length);
assertEquals("IBM", buyStocks.getOrderArray(0).getSymbol());
assertEquals("cmueller", buyStocks.getOrderArray(0).getBuyerID());
assertEquals(140.34, buyStocks.getOrderArray(0).getPrice(), 0);
assertEquals(2000, buyStocks.getOrderArray(0).getVolume());
}