DepthBinanceWebSocketTransaction extends ProductBinanceWebSocketTransaction { public BinanceOrderbook getOrderBook() { return orderBook; } DepthBinanceWebSocketTransaction(
      @JsonProperty("e") String eventType,
      @JsonProperty("E") String eventTime,
      @JsonProperty("s") String symbol,
      @JsonProperty("U") long firstUpdateId,
      @JsonProperty("u") long lastUpdateId,
      @JsonProperty("b") List<Object[]> _bids,
      @JsonProperty("a") List<Object[]> _asks); BinanceOrderbook getOrderBook(); long getFirstUpdateId(); long getLastUpdateId();  }
@Test public void testMapping() throws Exception { InputStream stream = this.getClass().getResourceAsStream("testDepthEvent.json"); DepthBinanceWebSocketTransaction transaction = mapper.readValue(stream, DepthBinanceWebSocketTransaction.class); assertEquals( BaseBinanceWebSocketTransaction.BinanceWebSocketTypes.DEPTH_UPDATE, transaction.getEventType()); BinanceOrderbook orderBook = transaction.getOrderBook(); Iterator<Entry<BigDecimal, BigDecimal>> bidIterator = orderBook.bids.entrySet().iterator(); assertOrderBookEntry(bidIterator, 0.10376590, 59.15767010); Iterator<Entry<BigDecimal, BigDecimal>> askIterator = orderBook.asks.entrySet().iterator(); assertOrderBookEntry(askIterator, 0.10376586, 159.15767010); assertOrderBookEntry(askIterator, 0.10383109, 345.86845230); assertOrderBookEntry(askIterator, 0.10490700, 0.00000000); }