code: @When("^I execute query '(.+?)'$")
      public void executeQuery(String query) throws Exception {
          Statement myStatement = null;
          int result = 0;
          Connection myConnection = this.commonspec.getConnection();
  
          try {
              myStatement = myConnection.createStatement();
              result = myStatement.executeUpdate(query);
              myStatement.close();
          } catch (Exception e) {
              e.printStackTrace();
              assertThat(result).as(e.getClass().getName() + ": " + e.getMessage()).isNotEqualTo(0);
          }
      }
docs: /*
  @param query
  executes query in database