### Question:
JDBCInputFormat extends GenericInputFormat implements NonParallelInput { @Override public void configure(Configuration parameters) { boolean needConfigure = isFieldNullOrEmpty(this.query) || isFieldNullOrEmpty(this.dbURL); if (needConfigure) { this.driverName = parameters.getString(DRIVER_KEY, null); this.username = parameters.getString(USERNAME_KEY, null); this.password = parameters.getString(PASSWORD_KEY, null); this.query = parameters.getString(QUERY_KEY, null); this.dbURL = parameters.getString(URL_KEY, null); } try { prepareQueryExecution(); } catch (SQLException e) { throw new IllegalArgumentException("Configure failed:\t!", e); } } 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 testInvalidConnection() { jdbcInputFormat = new JDBCInputFormat("org.apache.derby.jdbc.EmbeddedDriver", "jdbc:derby:memory:idontexist", "select * from books;"); jdbcInputFormat.configure(null); }
@Test(expected = IllegalArgumentException.class) public void testInvalidQuery() { jdbcInputFormat = new JDBCInputFormat("org.apache.derby.jdbc.EmbeddedDriver", "jdbc:derby:memory:ebookshop", "abc"); jdbcInputFormat.configure(null); }
@Test(expected = IllegalArgumentException.class) public void testInvalidDBType() { jdbcInputFormat = new JDBCInputFormat("idontexist.Driver", "jdbc:derby:memory:ebookshop", "select * from books;"); jdbcInputFormat.configure(null); }