BitcoindeAdapters { public static UserTrades adaptTradeHistory(BitcoindeMyTradesWrapper bitcoindeMyTradesWrapper) { return adaptTradeHistory(bitcoindeMyTradesWrapper, TradeSortType.SortByTimestamp); } private  BitcoindeAdapters(); static OrderBook adaptCompactOrderBook(
      BitcoindeCompactOrderbookWrapper bitcoindeOrderbookWrapper, CurrencyPair currencyPair); static OrderBook adaptOrderBook(
      BitcoindeOrderbookWrapper asksWrapper,
      BitcoindeOrderbookWrapper bidsWrapper,
      CurrencyPair currencyPair); static List<LimitOrder> createCompactOrders(
      CurrencyPair currencyPair, OrderType orderType, BitcoindeCompactOrder[] orders); static LimitOrder createOrder(
      CurrencyPair currencyPair,
      BitcoindeOrder bitcoindeOrder,
      OrderType orderType,
      String orderId,
      Date timeStamp); static Trades adaptTrades(
      BitcoindeTradesWrapper bitcoindeTradesWrapper, CurrencyPair currencyPair); static AccountInfo adaptAccountInfo(BitcoindeAccountWrapper bitcoindeAccount); static List<FundingRecord> adaptFundingHistory(
      final Currency currency,
      final List<BitcoindeAccountLedger> accountLedgers,
      final boolean leaveFeesSeperate); static FundingRecord.Type adaptFundingRecordType(BitcoindeAccountLedgerType type); static UserTrades adaptTradeHistory(BitcoindeMyTradesWrapper bitcoindeMyTradesWrapper); static UserTrades adaptTradeHistory(
      BitcoindeMyTradesWrapper bitcoindeMyTradesWrapper, TradeSortType sortType); static OpenOrders adaptOpenOrders(BitcoindeMyOrdersWrapper bitcoindeOpenOrdersWrapper); static OrderType adaptOrderType(final BitcoindeType type); static OrderStatus adaptOrderStatus(final BitcoindeOrderState state);  }
@Test public void testTradeHistoryAdapter() throws IOException { final InputStream is = BitcoindeAdaptersTest.class.getResourceAsStream( "/org/knowm/xchange/bitcoinde/v4/dto/my_trades.json"); final ObjectMapper mapper = new ObjectMapper(); BitcoindeMyTradesWrapper myTradesWrapper = mapper.readValue(is, BitcoindeMyTradesWrapper.class); final UserTrades userTrades = BitcoindeAdapters.adaptTradeHistory(myTradesWrapper); assertThat(userTrades.getUserTrades()).isNotEmpty(); assertThat(userTrades.getUserTrades().size()).isEqualTo(1); UserTrade trade = userTrades.getUserTrades().get(0); assertThat(trade.getType()).isEqualByComparingTo(OrderType.ASK); assertThat(trade.getOriginalAmount()).isEqualByComparingTo("0.5"); assertThat(trade.getCurrencyPair()).isEqualByComparingTo(CurrencyPair.BTC_EUR); assertThat(trade.getPrice()).isEqualByComparingTo("250.55"); assertThat(trade.getTimestamp()).isEqualTo("2015-01-10T15:00:00+02:00"); assertThat(trade.getId()).isEqualTo("2EDYNS"); assertThat(trade.getOrderId()).isNull(); assertThat(trade.getFeeAmount()).isEqualByComparingTo("0.6"); assertThat(trade.getFeeCurrency()).isEqualByComparingTo(Currency.EUR); assertThat(trade.getOrderUserReference()).isNull(); }