@Override
  public Optional<Customer> findByName(String name) throws SQLException {
    var sql = "select * from CUSTOMERS where name = ?;";

    try (var connection = dataSource.getConnection();
        var preparedStatement = connection.prepareStatement(sql)) {
      preparedStatement.setString(1, name);

      ResultSet rs = preparedStatement.executeQuery();

      if (rs.next()) {
        return Optional.of(
            Customer.builder()
                .name(rs.getString("name"))
                .money(Money.of(USD, rs.getBigDecimal("money")))
                .customerDao(this)
                .build());
      } else {
        return Optional.empty();
      }
    }
  }
@Test
  void shouldFindCustomerByName() throws SQLException {
    var customer = customerDao.findByName("customer");

    assertTrue(customer.isEmpty());

    TestUtils.executeSQL(INSERT_CUSTOMER_SQL, dataSource);

    customer = customerDao.findByName("customer");

    assertTrue(customer.isPresent());
    assertEquals("customer", customer.get().getName());
    assertEquals(Money.of(USD, 100), customer.get().getMoney());
  }