@Test
public void testStringInput() {

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