CryptopiaAdapters { public static Ticker adaptTicker(CryptopiaTicker cryptopiaTicker, CurrencyPair currencyPair) { return new Ticker.Builder() .currencyPair(currencyPair) .last(cryptopiaTicker.getLast()) .bid(cryptopiaTicker.getBid()) .ask(cryptopiaTicker.getAsk()) .high(cryptopiaTicker.getHigh()) .low(cryptopiaTicker.getLow()) .volume(cryptopiaTicker.getVolume()) .timestamp(new Date()) .build(); } private  CryptopiaAdapters(); static Date convertTimestamp(String timestamp); static OrderBook adaptOrderBook(
      CryptopiaOrderBook cryptopiaOrderBook, CurrencyPair currencyPair); static Ticker adaptTicker(CryptopiaTicker cryptopiaTicker, CurrencyPair currencyPair); static Trades adaptTrades(List<CryptopiaMarketHistory> cryptopiaMarketHistory); static ExchangeMetaData adaptToExchangeMetaData(
      List<CryptopiaCurrency> cryptopiaCurrencies, List<CryptopiaTradePair> tradePairs);  }
@Test public void testTickerAdapter() throws IOException { InputStream is = CryptopiaAdaptersTest.class.getResourceAsStream( "/org/knowm/xchange/cryptopia/dto/marketdata/example-ticker-data.json"); ObjectMapper mapper = new ObjectMapper(); CryptopiaBaseResponse<CryptopiaTicker> cryptopiaTicker = mapper.readValue(is, CryptopiaBaseResponseCryptopiaTicker.class); is.close(); Ticker ticker = CryptopiaAdapters.adaptTicker(cryptopiaTicker.getData(), CurrencyPair.ETH_BTC); assertThat(ticker).isNotNull(); assertThat(ticker.getLast().toString()).isEqualTo("0.07963205"); assertThat(ticker.getBid().toString()).isEqualTo("0.07963206"); assertThat(ticker.getAsk().toString()).isEqualTo("0.08003570"); assertThat(ticker.getVolume()).isEqualTo(new BigDecimal("361.93509400")); }