@Test
public void testAdaptOrderBookForDepth() throws JsonParseException, JsonMappingException, IOException {
CoinsetterListDepth coinsetterListDepth = ObjectMapperHelper.readValue(getClass().getResource("dto/marketdata/depth-list.json"), CoinsetterListDepth.class);
OrderBook orderBook = CoinsetterAdapters.adaptOrderBook(coinsetterListDepth);
// asks should be sorted ascending
List<LimitOrder> asks = orderBook.getAsks();
assertEquals(new BigDecimal("0.0"), asks.get(0).getLimitPrice());
assertEquals(new BigDecimal("0.0"), asks.get(0).getTradableAmount());
assertEquals(new BigDecimal("1000.0"), asks.get(9).getLimitPrice());
assertEquals(new BigDecimal("0.92"), asks.get(9).getTradableAmount());
// bids should be sorted descending
List<LimitOrder> bids = orderBook.getBids();
assertEquals(new BigDecimal("703.0"), bids.get(0).getLimitPrice());
assertEquals(new BigDecimal("0.15"), bids.get(0).getTradableAmount());
assertEquals(new BigDecimal("700.0"), bids.get(1).getLimitPrice());