@Test
public void testJDBCInputFormat() throws IOException {

	jdbcInputFormat = new JDBCInputFormat("org.apache.derby.jdbc.EmbeddedDriver", "jdbc:derby:memory:ebookshop", "select * from books");
	jdbcInputFormat.configure(null);
	Record record = new Record();
	int recordCount = 0;
	while (!jdbcInputFormat.reachedEnd()) {
		jdbcInputFormat.nextRecord(record);
		Assert.assertEquals(5, record.getNumFields());
		Assert.assertEquals("Field 0 should be int", IntValue.class, record.getField(0, IntValue.class).getClass());
		Assert.assertEquals("Field 1 should be String", StringValue.class, record.getField(1, StringValue.class).getClass());
		Assert.assertEquals("Field 2 should be String", StringValue.class, record.getField(2, StringValue.class).getClass());
		Assert.assertEquals("Field 3 should be float", DoubleValue.class, record.getField(3, DoubleValue.class).getClass());
		Assert.assertEquals("Field 4 should be int", IntValue.class, record.getField(4, IntValue.class).getClass());
		int[] pos = {0, 1, 2, 3, 4};
		Value[] values = {new IntValue(), new StringValue(), new StringValue(), new DoubleValue(), new IntValue()};
		Assert.assertTrue(record.equalsFields(pos, dbData[recordCount], values));
		recordCount++;
	}
	Assert.assertEquals(5, recordCount);
	
	cleanUpDerbyDatabases();
}