BTCTradeAdapters { public static Ticker adaptTicker(BTCTradeTicker btcTradeTicker, CurrencyPair currencyPair) { return new Ticker.Builder() .currencyPair(currencyPair) .high(btcTradeTicker.getHigh()) .low(btcTradeTicker.getLow()) .bid(btcTradeTicker.getBuy()) .ask(btcTradeTicker.getSell()) .last(btcTradeTicker.getLast()) .volume(btcTradeTicker.getVol()) .build(); } private  BTCTradeAdapters(); static Date adaptDatetime(String datetime); static CurrencyPair adaptCurrencyPair(String coin); static Ticker adaptTicker(BTCTradeTicker btcTradeTicker, CurrencyPair currencyPair); static OrderBook adaptOrderBook(BTCTradeDepth btcTradeDepth, CurrencyPair currencyPair); static Trades adaptTrades(BTCTradeTrade[] btcTradeTrades, CurrencyPair currencyPair); static boolean adaptResult(BTCTradeResult result); static Wallet adaptWallet(BTCTradeBalance balance); static String adaptDepositAddress(BTCTradeWallet wallet); static String adaptPlaceOrderResult(BTCTradePlaceOrderResult result); static OpenOrders adaptOpenOrders(BTCTradeOrder[] btcTradeOrders); static UserTrades adaptTrades(
      BTCTradeOrder[] btcTradeOrders, BTCTradeOrder[] btcTradeOrderDetails);  }
@Test public void testAdaptTicker() throws IOException { BTCTradeTicker btcTradeTicker = mapper.readValue( getClass().getResource("dto/marketdata/ticker.json"), BTCTradeTicker.class); Ticker ticker = BTCTradeAdapters.adaptTicker(btcTradeTicker, CurrencyPair.BTC_CNY); assertEquals(new BigDecimal("3760"), ticker.getHigh()); assertEquals(new BigDecimal("3658"), ticker.getLow()); assertEquals(new BigDecimal("3752"), ticker.getBid()); assertEquals(new BigDecimal("3758"), ticker.getAsk()); assertEquals(new BigDecimal("3757"), ticker.getLast()); assertEquals(new BigDecimal("11009.76"), ticker.getVolume()); }