@Override
  public void save(Product product) throws SQLException {
    var sql = "insert into PRODUCTS (name, price, expiration_date) values (?, ?, ?)";
    try (var connection = dataSource.getConnection();
        var preparedStatement = connection.prepareStatement(sql)) {
      preparedStatement.setString(1, product.getName());
      preparedStatement.setBigDecimal(2, product.getPrice().getAmount());
      preparedStatement.setDate(3, Date.valueOf(product.getExpirationDate()));
      preparedStatement.executeUpdate();
    }
  }
@Test
    void shouldSaveProduct() throws SQLException {

        productDao.save(product);

        try (var connection = dataSource.getConnection();
             var statement = connection.createStatement();
             ResultSet rs = statement.executeQuery(SELECT_PRODUCTS_SQL)) {

            assertTrue(rs.next());
            assertEquals(product.getName(), rs.getString("name"));
            assertEquals(product.getPrice(), Money.of(USD, rs.getBigDecimal("price")));
            assertEquals(product.getExpirationDate(), rs.getDate("expiration_date").toLocalDate());
        }

        assertThrows(SQLException.class, () -> productDao.save(product));
    }