public int login(final String username, final String password)
          throws SQLException {
    var sql = "select count(*) from USERS where username=? and password=?";
    ResultSet resultSet = null;
    try (var connection = dataSource.getConnection();
         var preparedStatement =
                 connection.prepareStatement(sql)
    ) {
      var result = 0;
      preparedStatement.setString(1, username);
      preparedStatement.setString(2, password);
      resultSet = preparedStatement.executeQuery();
      while (resultSet.next()) {
        result = resultSet.getInt(1);
      }
      if (result == 1) {
        LOGGER.info("Login successfully!");
      } else {
        LOGGER.info("Fail to login!");
      }
      return result;
    } finally {
      if (resultSet != null) {
        resultSet.close();
      }
    }
  }
@Test
  void loginShouldFail() throws SQLException {
    var dataSource = createDataSource();
    var userTableModule = new UserTableModule(dataSource);
    var user = new User(1, "123456", "123456");
    assertEquals(0, userTableModule.login(user.getUsername(),
            user.getPassword()));
  }