@Test
public void testReadHeadersFromFile() throws IOException {
File testFile1 = new File("src/test/resources/datasync_unit_test_three_rows.csv");
ObjectMapper mapper = new ObjectMapper().enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
File controlFile = new File("src/test/resources/datasync_complex_control.json");
ControlFile cf = mapper.readValue(controlFile, ControlFile.class);
String[] expectedHeaders1 = new String[] {"ID", "Name", "Another Name", "Date"};
String[] actualHeaders1 = Utils.pullHeadersFromFile(testFile1, cf.csv, 0);
for(int i=0; i<Math.max(expectedHeaders1.length, actualHeaders1.length); i++)
TestCase.assertEquals(expectedHeaders1[i], actualHeaders1[i]);