LimitOrder extends Order implements Comparable<LimitOrder> { public BigDecimal getLimitPrice() { return limitPrice; } LimitOrder(
      OrderType type,
      BigDecimal originalAmount,
      Instrument instrument,
      String id,
      Date timestamp,
      BigDecimal limitPrice);  LimitOrder(
      OrderType type,
      BigDecimal originalAmount,
      BigDecimal cumulativeAmount,
      Instrument instrument,
      String id,
      Date timestamp,
      BigDecimal limitPrice);  LimitOrder(
      OrderType type,
      BigDecimal originalAmount,
      Instrument instrument,
      String id,
      Date timestamp,
      BigDecimal limitPrice,
      BigDecimal averagePrice,
      BigDecimal cumulativeAmount,
      BigDecimal fee,
      OrderStatus status);  LimitOrder(
      OrderType type,
      BigDecimal originalAmount,
      Instrument instrument,
      String id,
      Date timestamp,
      BigDecimal limitPrice,
      BigDecimal averagePrice,
      BigDecimal cumulativeAmount,
      BigDecimal fee,
      OrderStatus status,
      String userReference); BigDecimal getLimitPrice(); @Override String toString(); @Override int compareTo(LimitOrder limitOrder); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testBuilder() { final OrderType type = OrderType.BID; final BigDecimal originalAmount = new BigDecimal("99.401"); final BigDecimal averagePrice = new BigDecimal("255.00"); final BigDecimal cumulativeAmount = new BigDecimal("0.00"); final CurrencyPair currencyPair = CurrencyPair.LTC_BTC; final BigDecimal limitPrice = new BigDecimal("251.64"); final BigDecimal fee = new BigDecimal("22.2"); final String userReference = "123"; final Date timestamp = new Date(); final String id = "id"; final Order.OrderStatus status = Order.OrderStatus.FILLED; final LimitOrder copy = new LimitOrder.Builder(type, currencyPair) .originalAmount(originalAmount) .averagePrice(averagePrice) .cumulativeAmount(cumulativeAmount) .limitPrice(limitPrice) .orderStatus(status) .timestamp(timestamp) .id(id) .flag(TestFlags.TEST1) .fee(fee) .userReference(userReference) .build(); assertThat(copy.getType()).isEqualTo(type); assertThat(copy.getOriginalAmount()).isEqualTo(originalAmount); assertThat(copy.getAveragePrice()).isEqualTo(averagePrice); assertThat(copy.getCumulativeAmount()).isEqualTo(cumulativeAmount); assertThat(copy.getCurrencyPair()).isEqualTo(currencyPair); assertThat(copy.getLimitPrice()).isEqualTo(limitPrice); assertThat(copy.getTimestamp()).isEqualTo(timestamp); assertThat(copy.getId()).isEqualTo(id); assertThat(copy.getOrderFlags()).hasSize(1); assertThat(copy.getOrderFlags()).containsExactly(TestFlags.TEST1); assertThat(copy.hasFlag(TestFlags.TEST1)); assertThat(copy.getStatus()).isEqualTo(status); assertThat(copy.getFee()).isEqualTo(fee); assertThat(copy.getUserReference()).isEqualTo(userReference); }