public void testAdaptOrdersToOrdersContainer() {
BitfinexLevel[] levels = initLevels();
BitfinexAdapters.OrdersContainer container = BitfinexAdapters.adaptOrders(levels, CurrencyPair.BTC_USD, OrderType.BID);
BitfinexLevel lastLevel = levels[levels.length - 1];
assertEquals(lastLevel.getTimestamp().multiply(new BigDecimal(1000l)).longValue(), container.getTimestamp());
assertEquals(container.getLimitOrders().size(), levels.length);
for (int i = 0; i < levels.length; i++) {
LimitOrder order = container.getLimitOrders().get(i);
long expectedTimestampMillis = levels[i].getTimestamp().multiply(new BigDecimal(1000l)).longValue();