public void returnProduct(Product product) {
    LOGGER.info(
        String.format(
            "%s want to return %s($%.2f)...",
            name, product.getName(), product.getSalePrice().getAmount()));
    if (purchases.contains(product)) {
      try {
        customerDao.deleteProduct(product, this);
        purchases.remove(product);
        receiveMoney(product.getSalePrice());
        LOGGER.info(String.format("%s returned %s!", name, product.getName()));
      } catch (SQLException ex) {
        LOGGER.error(ex.getMessage());
      }
    } else {
      LOGGER.error(String.format("%s didn't buy %s...", name, product.getName()));
    }
  }
@Test
    void shouldRemoveProductFromPurchases() {
        customer.setPurchases(new ArrayList<>(Arrays.asList(product)));

        customer.returnProduct(product);

        assertEquals(new ArrayList<>(), customer.getPurchases());
        assertEquals(Money.of(USD, 200), customer.getMoney());

        customer.returnProduct(product);

        assertEquals(new ArrayList<>(), customer.getPurchases());
        assertEquals(Money.of(USD, 200), customer.getMoney());
    }