@Test(expected = SQLException.class)
  public void testSetFetchSizeNegativeValue() throws SQLException {
    final HiveConnection connection = mock(HiveConnection.class, withSettings().useConstructor());
    final Iface iface = mock(Iface.class);
    final TSessionHandle handle = mock(TSessionHandle.class);

    try (HiveStatement stmt = new HiveStatement(connection, iface, handle)) {
      stmt.setFetchSize(-1);
    }
  }
Gives the JDBC driver a hint as to the number of rows that should be
fetched from the database when more rows are needed for ResultSet objects
generated by this Statement. If the value specified is zero, then the hint
is ignored. If the hint is less than zero, an error is thrown.

@see Statement#setFetchSize(int)
jdbc/src/test/org/apache/hive/jdbc/TestHiveStatement.java