// Read in the JSON from the example resources
InputStream is = VirtExTradesJSONTest.class.getResourceAsStream("/marketdata/example-trades-data-v2.json");
// Use Jackson to parse it
ObjectMapper mapper = new ObjectMapper();
VirtExTradesWrapper VirtExTrades = mapper.readValue(is, VirtExTradesWrapper.class);
Trades trades = VirtExAdapters.adaptTrades(VirtExTrades.getTrades(), CurrencyPair.BTC_CAD);
assertThat(trades.getTrades().size()).isEqualTo(632);
// Verify all fields filled
assertThat(trades.getTrades().get(0).getPrice().doubleValue() == 545.060000000);
assertThat(trades.getTrades().get(0).getTradableAmount().doubleValue() == 1.189100000);