DataUtils { public static Object get(Data data, Row row, int columnIndex) { checkColumnIndex(data, columnIndex); return row.getValues().get(columnIndex); }  static int getColumnIndex(Data data, String columnName); static Object get(Data data, Row row, int columnIndex); static Object get(Data data, Row row, String columnName);  }
@Test(expected = IllegalArgumentException.class) public void testGetInvalidColumnIndex(){ Data data = createData(); Row row = createRow("11", "12"); get(data, row, 2); }
@Test public void testGet() { Data data = createData(); Row row = createRow("11", "12"); assertThat(get(data, row, "column_one"), equalTo("11")); assertThat(get(data, row, 1), equalTo("12")); }