### Question:
LineItemBuilder { static boolean isWholeNumber(BigDecimal number) { return number.remainder(BigDecimal.ONE).compareTo(BigDecimal.ZERO) == 0; } LineItemBuilder();   LineItemBuilder(String currencyCode); LineItemBuilder setCurrencyCode(String currencyCode); LineItemBuilder setUnitPrice(long unitPrice); LineItemBuilder setTotalPrice(long totalPrice); LineItemBuilder setQuantity(BigDecimal quantity); LineItemBuilder setQuantity(double quantity); LineItemBuilder setDescription(String description); LineItemBuilder setRole(int role); LineItem build(); static final Set<Integer> VALID_ROLES; }### Answer:
@Test public void isWholeNumber_whenBigDecimalFromInteger_returnsTrue() { assertTrue(LineItemBuilder.isWholeNumber(BigDecimal.ZERO)); assertTrue(LineItemBuilder.isWholeNumber(BigDecimal.valueOf(555))); }
@Test public void isWholeNumber_whenBigDecimalDoubleWithoutDecimalPart_returnsTrue() { assertTrue(LineItemBuilder.isWholeNumber(BigDecimal.valueOf(1.0000))); }
@Test public void isWholeNumber_whenBigDecimalDoubleWithDecimalPart_returnsFalse() { assertFalse(LineItemBuilder.isWholeNumber(BigDecimal.valueOf(1.5))); assertFalse(LineItemBuilder.isWholeNumber(BigDecimal.valueOf(2.07))); }