### Question:
Trade implements Serializable { public Order operate(int index) { return operate(index, Decimal.NaN, Decimal.NaN); } Trade();  Trade(OrderType startingType);  Trade(Order entry, Order exit); Order getEntry(); Order getExit(); @Override boolean equals(Object obj); @Override int hashCode(); Order operate(int index); Order operate(int index, Decimal price, Decimal amount); boolean isClosed(); boolean isOpened(); boolean isNew(); @Override String toString();  }### Answer:
@Test(expected = IllegalStateException.class) public void whenExitIndexIsLessThanEntryIndexShouldThrowException() { newTrade.operate(3); newTrade.operate(1); }