### Question:
GeneratedKeysResultSet extends AbstractUnsupportedGeneratedKeysResultSet { @Override public boolean next() throws SQLException { if (closed || !generatedKeys.hasNext()) { currentGeneratedKey = null; return false; } currentGeneratedKey = generatedKeys.next(); return true; } GeneratedKeysResultSet(); @Override boolean isClosed(); @Override boolean next(); @Override void close(); @Override ResultSetMetaData getMetaData(); @Override boolean wasNull(); @Override String getString(final int columnIndex); @Override String getString(final String columnLabel); @Override byte getByte(final int columnIndex); @Override byte getByte(final String columnLabel); @Override short getShort(final int columnIndex); @Override short getShort(final String columnLabel); @Override int getInt(final int columnIndex); @Override int getInt(final String columnLabel); @Override long getLong(final int columnIndex); @Override long getLong(final String columnLabel); @Override float getFloat(final int columnIndex); @Override float getFloat(final String columnLabel); @Override double getDouble(final int columnIndex); @Override double getDouble(final String columnLabel); @Override BigDecimal getBigDecimal(final int columnIndex, final int scale); @Override BigDecimal getBigDecimal(final String columnLabel, final int scale); @Override BigDecimal getBigDecimal(final int columnIndex); @Override BigDecimal getBigDecimal(final String columnLabel); @Override byte[] getBytes(final int columnIndex); @Override byte[] getBytes(final String columnLabel); @Override Object getObject(final int columnIndex); @Override Object getObject(final String columnLabel); @Override int findColumn(final String columnLabel); @Override int getType(); @Override int getConcurrency(); @Override Statement getStatement();  }### Answer:
@Test public void assertNext() throws Exception { assertTrue(actualResultSet.next()); assertTrue(actualResultSet.next()); assertFalse(actualResultSet.next()); }
@Test public void assertNextForEmptyResultSet() throws Exception { GeneratedKeysResultSet actual = new GeneratedKeysResultSet(); assertFalse(actual.next()); }