### Question:
TradingRecord implements Serializable { public int getTradeCount() { return trades.size(); } TradingRecord();  TradingRecord(OrderType entryOrderType);  TradingRecord(Order... orders); Trade getCurrentTrade(); final void operate(int index); final void operate(int index, Decimal price, Decimal amount); final boolean enter(int index); final boolean enter(int index, Decimal price, Decimal amount); final boolean exit(int index); final boolean exit(int index, Decimal price, Decimal amount); boolean isClosed(); List<Trade> getTrades(); int getTradeCount(); Trade getLastTrade(); Order getLastOrder(); Order getLastOrder(OrderType orderType); Order getLastEntry(); Order getLastExit();  }### Answer:
@Test public void getTradeCount() { assertEquals(0, emptyRecord.getTradeCount()); assertEquals(1, openedRecord.getTradeCount()); assertEquals(2, closedRecord.getTradeCount()); }