// Read in the JSON from the example resources
InputStream is = KrakenAdaptersTest.class.getResourceAsStream("/marketdata/example-ticker-data.json");
// Use Jackson to parse it
ObjectMapper mapper = new ObjectMapper();
KrakenTickerResult krakenTicker = mapper.readValue(is, KrakenTickerResult.class);
CurrencyPair currencyPair = CurrencyPair.BTC_EUR;
String krakenCurencyPair = "XXBTZEUR";
Ticker ticker = KrakenAdapters.adaptTicker(krakenTicker.getResult().get(krakenCurencyPair), currencyPair);
// Verify that the example data was unmarshalled correctly
assertThat(ticker.getAsk()).isEqualTo(new BigDecimal("562.26651"));
assertThat(ticker.getBid()).isEqualTo(new BigDecimal("560.46600"));
assertThat(ticker.getLow()).isEqualTo(new BigDecimal("560.00000"));