BitcoindeTradesWrapper extends BitcoindeResponse { @JsonCreator public BitcoindeTradesWrapper( @JsonProperty("trading_pair") @JsonDeserialize(using = CurrencyPairDeserializer.class) CurrencyPair tradingPair, @JsonProperty("trades") BitcoindeTrade[] trades, @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.trades = trades; } @JsonCreator  BitcoindeTradesWrapper(
      @JsonProperty("trading_pair") @JsonDeserialize(using = CurrencyPairDeserializer.class)
          CurrencyPair tradingPair,
      @JsonProperty("trades") BitcoindeTrade[] trades,
      @JsonProperty("credits") Integer credits,
      @JsonProperty("errors") BitcoindeError[] errors,
      @JsonProperty("maintenance") BitcoindeMaintenance maintenance,
      @JsonProperty("nonce") Long nonce);   }
@Test public void testBitcoindeTradesWrapper() throws IOException { final InputStream is = BitcoindeTradesWrapperTest.class.getResourceAsStream( "/org/knowm/xchange/bitcoinde/v4/dto/trades.json"); final ObjectMapper mapper = new ObjectMapper(); final BitcoindeTradesWrapper bitcoindeTradesWrapper = mapper.readValue(is, BitcoindeTradesWrapper.class); final BitcoindeTrade[] trades = bitcoindeTradesWrapper.getTrades(); assertThat(trades[0].getDate()).isEqualTo("2017-07-22T12:14:14+02:00"); assertThat(trades[0].getPrice()).isEqualByComparingTo("2391.48"); assertThat(trades[0].getAmount()).isEqualByComparingTo("0.90000000"); assertThat(trades[0].getTid()).isEqualTo(2844384L); }