@Test
public void testRemovingTrailingCR() {

	try {
		String first = "First line";
		String second = "Second line";
		String fileContent = first + "\r\n" + second + "\r\n";
		final FileInputSplit split = createInputSplit(fileContent);
		final PrimitiveInputFormat<String> format = new PrimitiveInputFormat<String>(PATH ,String.class);
		format.configure(new Configuration());
		format.open(split);
		String result = null;
		result = format.nextRecord(result);
		assertEquals(first, result);
		result = format.nextRecord(result);
		assertEquals(second, result);
	}
	catch (Exception ex) {
		fail("Test failed due to a " + ex.getClass().getName() + ": " + ex.getMessage());
	}
}