// Use Jackson to parse it
ObjectMapper mapper = new ObjectMapper();
JavaType type = mapper.getTypeFactory().constructCollectionType(List.class, BTCChinaTrade.class);
List<BTCChinaTrade> BTCChinaTrades = mapper.readValue(is, type);
Trades trades = BTCChinaAdapters.adaptTrades(BTCChinaTrades, CurrencyPair.BTC_CNY);
assertThat(trades.getTrades().size()).isEqualTo(101);
// Verify all fields filled
assertThat(trades.getTrades().get(0).getType().equals(OrderType.BID));
assertThat(trades.getTrades().get(0).getPrice().doubleValue() == 4719);
assertThat(trades.getTrades().get(0).getTradableAmount().doubleValue() == 0.425);
assertThat(DateUtils.toUTCString(trades.getTrades().get(0).getTimestamp())).isEqualTo("2014-01-03 16:04:24 GMT");
System.out.println(trades.getTrades().get(0).toString());
}