// Use Jackson to parse it
ObjectMapper mapper = new ObjectMapper();
BitstampUserTransaction[] bitstampUserTransactions = mapper.readValue(is, BitstampUserTransaction[].class);
UserTrades userTradeHistory = BitstampAdapters.adaptTradeHistory(bitstampUserTransactions);
assertThat(userTradeHistory.getUserTrades().get(0).getId()).isEqualTo("1296712");
assertThat(userTradeHistory.getUserTrades().get(0).getType()).isEqualTo(OrderType.BID);
assertThat(userTradeHistory.getUserTrades().get(0).getPrice().toString()).isEqualTo("131.50");
assertThat(userTradeHistory.getUserTrades().get(0).getFeeAmount().toString()).isEqualTo("0.06");
assertThat(userTradeHistory.getUserTrades().get(1).getPrice().toString()).isEqualTo("131.50");
assertThat(userTradeHistory.getUserTrades().get(1).getType()).isEqualTo(OrderType.ASK);
assertThat(userTradeHistory.getUserTrades().get(1).getFeeAmount().toString()).isEqualTo("0.06");
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dateString = f.format(userTradeHistory.getTrades().get(0).getTimestamp());
assertThat(dateString).isEqualTo("2013-09-02 13:17:49");
}