BitcoindeOrderbookWrapper extends BitcoindeResponse { @JsonCreator public BitcoindeOrderbookWrapper( @JsonProperty("orders") BitcoindeOrder[] bitcoindeOrders, @JsonProperty("credits") Integer credits, @JsonProperty("errors") BitcoindeError[] errors, @JsonProperty("maintenance") BitcoindeMaintenance maintenance, @JsonProperty("nonce") Long nonce) { super(credits, errors, maintenance, nonce); this.bitcoindeOrders = bitcoindeOrders; } @JsonCreator  BitcoindeOrderbookWrapper(
      @JsonProperty("orders") BitcoindeOrder[] bitcoindeOrders,
      @JsonProperty("credits") Integer credits,
      @JsonProperty("errors") BitcoindeError[] errors,
      @JsonProperty("maintenance") BitcoindeMaintenance maintenance,
      @JsonProperty("nonce") Long nonce);   }
@Test public void testBitcoindeOrderbookWrapper() throws JsonParseException, JsonMappingException, IOException { final InputStream is = BitcoindeOrderbookWrapperTest.class.getResourceAsStream( "/org/knowm/xchange/bitcoinde/v4/dto/orderbook.json"); final ObjectMapper mapper = new ObjectMapper(); final BitcoindeOrderbookWrapper bitcoindeOrderBook = mapper.readValue(is, BitcoindeOrderbookWrapper.class); final BitcoindeOrder[] orders = bitcoindeOrderBook.getBitcoindeOrders(); assertThat(orders.length).isEqualTo(1); assertThat(orders[0].getOrderId()).isEqualTo("A1B2D3"); assertThat(orders[0].getTradingPair()).isEqualByComparingTo(CurrencyPair.BTC_EUR); assertThat(orders[0].getType()).isEqualByComparingTo(BitcoindeType.BUY); assertThat(orders[0].getExternalWalletOrder()).isFalse(); assertThat(orders[0].getMinAmount()).isEqualByComparingTo("0.1"); assertThat(orders[0].getMaxAmount()).isEqualByComparingTo("0.5"); assertThat(orders[0].getPrice()).isEqualByComparingTo("230.55"); assertThat(orders[0].getMinVolume()).isEqualByComparingTo("23.06"); assertThat(orders[0].getMaxVolume()).isEqualByComparingTo("115.28"); assertThat(orders[0].getRequirementsFullfilled()).isTrue(); assertThat(orders[0].getTradingPartnerInformation()).isNotNull(); assertThat(orders[0].getTradingPartnerInformation().getUserName()).isEqualTo("bla"); assertThat(orders[0].getTradingPartnerInformation().getTrustLevel()) .isEqualByComparingTo(BitcoindeTrustLevel.GOLD); assertThat(orders[0].getTradingPartnerInformation().getRating()).isEqualTo(99); assertThat(orders[0].getTradingPartnerInformation().getKycFull()).isTrue(); assertThat(orders[0].getTradingPartnerInformation().getBankName()).isEqualTo("Sparkasse"); assertThat(orders[0].getTradingPartnerInformation().getBic()).isEqualTo("HASPDEHHXXX"); assertThat(orders[0].getTradingPartnerInformation().getSeatOfBank()).isEqualTo("DE"); assertThat(orders[0].getTradingPartnerInformation().getAmountTrades()).isEqualTo(52); assertThat(orders[0].getOrderRequirements()).isNotNull(); assertThat(orders[0].getOrderRequirements().getMinTrustLevel()) .isEqualByComparingTo(BitcoindeTrustLevel.GOLD); assertThat(orders[0].getOrderRequirements().getOnlyKycFull()).isTrue(); assertThat(orders[0].getOrderRequirements().getPaymentOption()) .isEqualByComparingTo(BitcoindePaymentOption.EXPRESS_ONLY); assertThat(orders[0].getOrderRequirements().getSeatOfBank()).containsExactly("DE", "NL"); assertThat(bitcoindeOrderBook.getCredits()).isEqualTo(12); assertThat(bitcoindeOrderBook.getErrors()).isEmpty(); assertThat(bitcoindeOrderBook.getMaintenance()).isNull(); assertThat(bitcoindeOrderBook.getNonce()).isNull(); }