@Test
public void testIntegerInput() throws IOException {

	try {
		final String fileContent = "111|222|";
		final FileInputSplit split = createInputSplit(fileContent);
		final PrimitiveInputFormat<Integer> format = new PrimitiveInputFormat<Integer>(PATH,"|", Integer.class);
		format.configure(new Configuration());
		format.open(split);
		Integer result = null;
		result = format.nextRecord(result);
		assertEquals(Integer.valueOf(111), result);
		result = format.nextRecord(result);
		assertEquals(Integer.valueOf(222), result);
		result = format.nextRecord(result);
		assertNull(result);
		assertTrue(format.reachedEnd());
	}
	catch (Exception ex) {
		fail("Test failed due to a " + ex.getClass().getName() + ": " + ex.getMessage());
	}
}