BitcoindeCompactOrderbookWrapper extends BitcoindeResponse { @JsonCreator public BitcoindeCompactOrderbookWrapper( @JsonProperty("trading_pair") @JsonDeserialize(using = CurrencyPairDeserializer.class) CurrencyPair tradingPair, @JsonProperty("orders") BitcoindeCompactOrders bitcoindeOrders, @JsonProperty("credits") Integer credits, @JsonProperty("errors") BitcoindeError[] errors, @JsonProperty("maintenance") BitcoindeMaintenance maintenance, @JsonProperty("nonce") Long nonce) { super(credits, errors, maintenance, nonce); this.tradingPair = tradingPair; this.bitcoindeOrders = bitcoindeOrders; } @JsonCreator  BitcoindeCompactOrderbookWrapper(
      @JsonProperty("trading_pair") @JsonDeserialize(using = CurrencyPairDeserializer.class)
          CurrencyPair tradingPair,
      @JsonProperty("orders") BitcoindeCompactOrders bitcoindeOrders,
      @JsonProperty("credits") Integer credits,
      @JsonProperty("errors") BitcoindeError[] errors,
      @JsonProperty("maintenance") BitcoindeMaintenance maintenance,
      @JsonProperty("nonce") Long nonce);   }
@Test public void testBitcoindeCompactOrderbookWrapper() throws JsonParseException, JsonMappingException, IOException { final InputStream is = BitcoindeCompactOrderbookWrapperTest.class.getResourceAsStream( "/org/knowm/xchange/bitcoinde/v4/dto/compact_orderbook.json"); final ObjectMapper mapper = new ObjectMapper(); final BitcoindeCompactOrderbookWrapper bitcoindeOrderBook = mapper.readValue(is, BitcoindeCompactOrderbookWrapper.class); final BitcoindeCompactOrders orders = bitcoindeOrderBook.getBitcoindeOrders(); assertThat(orders.getAsks()[0].getPrice()).isEqualByComparingTo("2461.61"); assertThat(orders.getAsks()[0].getAmount()).isEqualByComparingTo("0.0406218"); assertThat(orders.getBids()[0].getPrice()).isEqualByComparingTo("1200"); assertThat(orders.getBids()[0].getAmount()).isEqualByComparingTo("8.333"); }