BitcoindeMyOrdersWrapper extends BitcoindePagedResponse { @JsonCreator public BitcoindeMyOrdersWrapper( @JsonProperty("orders") List<BitcoindeMyOrder> orders, @JsonProperty("page") BitcoindePage page, @JsonProperty("credits") Integer credits, @JsonProperty("errors") BitcoindeError[] errors, @JsonProperty("maintenance") BitcoindeMaintenance maintenance, @JsonProperty("nonce") Long nonce) { super(page, credits, errors, maintenance, nonce); this.orders = orders; } @JsonCreator  BitcoindeMyOrdersWrapper(
      @JsonProperty("orders") List<BitcoindeMyOrder> orders,
      @JsonProperty("page") BitcoindePage page,
      @JsonProperty("credits") Integer credits,
      @JsonProperty("errors") BitcoindeError[] errors,
      @JsonProperty("maintenance") BitcoindeMaintenance maintenance,
      @JsonProperty("nonce") Long nonce);   }
@Test public void testBitcoindeMyOrdersWrapper() throws JsonParseException, JsonMappingException, IOException { final InputStream is = BitcoindeMyOrdersWrapperTest.class.getResourceAsStream( "/org/knowm/xchange/bitcoinde/v4/dto/my_orders.json"); final ObjectMapper mapper = new ObjectMapper(); BitcoindeMyOrdersWrapper bitcoindeOpenOrdersWrapper = mapper.readValue(is, BitcoindeMyOrdersWrapper.class); assertThat(bitcoindeOpenOrdersWrapper.getOrders().size()).isEqualTo(1); final BitcoindeMyOrder order = bitcoindeOpenOrdersWrapper.getOrders().get(0); assertThat(order.getOrderId()).isEqualTo("VNSP86"); assertThat(order.getTradingPair()).isEqualTo(CurrencyPair.BTC_EUR); assertThat(order.getExternalWalletOrder()).isFalse(); assertThat(order.getMaxAmount()).isEqualByComparingTo("0.01"); assertThat(order.getMinAmount()).isEqualByComparingTo("0.01"); assertThat(order.getPrice()).isEqualByComparingTo("6000"); assertThat(order.getMaxVolume()).isEqualByComparingTo("60"); assertThat(order.getMinVolume()).isEqualByComparingTo("60"); assertThat(order.getOrderRequirements()).isNotNull(); assertThat(order.getOrderRequirements().getMinTrustLevel()) .isEqualTo(BitcoindeTrustLevel.SILVER); assertThat(order.getOrderRequirements().getOnlyKycFull()).isFalse(); assertThat(order.getOrderRequirements().getSeatOfBank()) .containsExactly( "AT", "BE", "BG", "CH", "CY", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "GR", "HR", "HU", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MQ", "MT", "NL", "NO", "PL", "PT", "RO", "SE", "SI", "SK"); assertThat(order.getOrderRequirements().getPaymentOption()) .isEqualTo(BitcoindePaymentOption.EXPRESS_SEPA); assertThat(order.getNewOrderForRemainingAmount()).isFalse(); assertThat(order.getState()).isEqualTo(BitcoindeOrderState.PENDING); assertThat(order.getEndDatetime()).isEqualTo("2018-01-30T23:45:00+01:00"); assertThat(order.getCreatedAt()).isEqualTo("2018-01-25T17:35:19+01:00"); assertThat(bitcoindeOpenOrdersWrapper.getPage()).isEqualTo(new BitcoindePage(1, 1)); }