### Question:
Order implements Serializable { public BigDecimal getTotalSum() { return getItemPriceSum(); } Order(long orderId, ObjectId userId, List<OrderItem> orderItems, DeliveryAddress deliveryAddress, String sessionId);  Order(); long getOrderId(); void setOrderId(Long orderId); ObjectId getUserId(); void setUserId(ObjectId userId); List<OrderItem> getOrderItems(); Date getOrderDate(); void setOrderDate(Date orderDate); DeliveryAddress getDeliveryAddress(); void setDeliveryAddress(DeliveryAddress deliveryAddress); Supplier getSupplier(); void setSupplier(Supplier supplier); String getSessionId(); void setSessionId(String sessionId); void setOrderId(long orderId); BigDecimal getItemCount(); BigDecimal getItemPriceSum(); BigDecimal getTotalSum(); static final String COLLECTION_NAME; }### Answer:
@Test public void testGetTotalSum() throws Exception { assertEquals(BigDecimal.valueOf(8).compareTo(order.getTotalSum()), 0); }
@Test public void testGetTotalSum() throws Exception { double globalDiscount = 0; double total = 10.0 - (10.0 * (globalDiscount/100.0)); assertEquals(BigDecimal.valueOf(total).compareTo(order.getTotalSum()), 0); }