RoundTrip implements Serializable { public boolean isComplete() { return entry != null && exit != null; }  void addTradeReference( TradeOrder order, TradeReferenceLine tradeReference ); String getResults(); boolean isComplete(); String getCorrelationId(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static final long serialVersionUID; }
@Test public void testIsComplete() { assertFalse(roundTrip.isComplete()); roundTrip.entry = order; roundTrip.exit = order; assertTrue(roundTrip.isComplete()); roundTrip.entry = null; assertFalse(roundTrip.isComplete()); roundTrip.entry = order; assertTrue(roundTrip.isComplete()); roundTrip.exit = null; assertFalse(roundTrip.isComplete()); roundTrip.exit = order; assertTrue(roundTrip.isComplete()); }