@Test
public void testReadSparseWithShuffledPositions() throws IOException {

	try {
		final CsvInputFormat<Tuple3<Integer, Integer, Integer>> format = new CsvInputFormat<Tuple3<Integer, Integer, Integer>>(PATH);
		
		format.setFieldDelimiter('|');
		
		try {
			format.setFields(new int[] {8, 1, 3}, new Class<?>[] {Integer.class, Integer.class, Integer.class});
			fail("Input sequence should have been rejected.");
		}
		catch (IllegalArgumentException e) {
			// that is what we want
		}
	}
	catch (Exception ex) {
		fail("Test failed due to a " + ex.getClass().getName() + ": " + ex.getMessage());
	}
}