@Test
public void testAdaptTrade() throws JSONException, IOException {
JSONObject jsonObject = new JSONObject(IOUtils.toString(getClass().getResource("trade.json"), Charsets.UTF_8));
Trade trade = BTCChinaJSONObjectAdapters.adaptTrade(jsonObject);
assertEquals(new BigDecimal("0.79000000"), trade.getTradableAmount());
assertEquals(CurrencyPair.BTC_CNY, trade.getCurrencyPair());
assertEquals(new BigDecimal("2350.25"), trade.getPrice());
assertEquals("8948160", trade.getId());
assertEquals(1411924375000L, trade.getTimestamp().getTime());
assertEquals(OrderType.ASK, trade.getType());
}