@Test
public void testAdaptOrder() throws JSONException, IOException {
JSONObject jsonObject = new JSONObject(IOUtils.toString(getClass().getResource("order.json"), Charsets.UTF_8));
BTCChinaOrder order = BTCChinaJSONObjectAdapters.adaptOrder(jsonObject);
assertEquals(new BigDecimal("0.01"), order.getTradableAmount());
assertEquals("26821399", order.getId());
assertEquals(new BigDecimal("3605.23"), order.getLimitPrice());
assertEquals(CurrencyPair.BTC_CNY, order.getCurrencyPair());
assertEquals(BTCChinaOrderStatus.CANCELLED, order.getStatus());
assertEquals(1411924393000L, order.getTimestamp().getTime());
assertEquals(OrderType.ASK, order.getType());
assertEquals(new BigDecimal("0.01"), order.getAmountOriginal());
}