public int registerUser(final User user) throws SQLException {
    var sql = "insert into USERS (username, password) values (?,?)";
    try (var connection = dataSource.getConnection();
         var preparedStatement =
                 connection.prepareStatement(sql)
    ) {
      preparedStatement.setString(1, user.getUsername());
      preparedStatement.setString(2, user.getPassword());
      var result = preparedStatement.executeUpdate();
      LOGGER.info("Register successfully!");
      return result;
    }
  }
@Test
  void registerShouldFail() throws SQLException {
    var dataSource = createDataSource();
    var userTableModule = new UserTableModule(dataSource);
    var user = new User(1, "123456", "123456");
    userTableModule.registerUser(user);
    assertThrows(SQLException.class, () -> userTableModule.registerUser(user));
  }