### Question:
JDBCInputFormat extends GenericInputFormat implements NonParallelInput { @Override public Record nextRecord(Record record) { try { resultSet.next(); ResultSetMetaData rsmd = resultSet.getMetaData(); int column_count = rsmd.getColumnCount(); record.setNumFields(column_count); for (int pos = 0; pos < column_count; pos++) { int type = rsmd.getColumnType(pos + 1); retrieveTypeAndFillRecord(pos, type, record); } return record; } catch (SQLException e) { throw new IllegalArgumentException("Couldn't read data:\t" + e.getMessage()); } catch (NotTransformableSQLFieldException e) { throw new IllegalArgumentException("Couldn't read data because of unknown column sql-type:\t" + e.getMessage()); } catch (NullPointerException e) { throw new IllegalArgumentException("Couldn't access resultSet:\t" + e.getMessage()); } } JDBCInputFormat();  JDBCInputFormat(String driverName, String dbURL, String username, String password, String query);  JDBCInputFormat(String driverName, String dbURL, String query);  JDBCInputFormat(Configuration parameters, String query); @Override void configure(Configuration parameters); @Override boolean reachedEnd(); @Override Record nextRecord(Record record); final String DRIVER_KEY; final String USERNAME_KEY; final String PASSWORD_KEY; final String URL_KEY; final String QUERY_KEY; }### Answer:
@Test(expected = IllegalArgumentException.class) public void testNotConfiguredFormatNext() { jdbcInputFormat = new JDBCInputFormat("org.apache.derby.jdbc.EmbeddedDriver", "jdbc:derby:memory:ebookshop", "select * from books"); jdbcInputFormat.nextRecord(new Record()); }