@Test
public void smallSimpleCsv() throws LoadException {

  // GIVEN
  // simple CSV with 3 columns, one mapped to String, one Long and one Double.
  BigByteBuffer buf = IoUtils.inputStreamToBigByteBuffer(getClass().getResourceAsStream(CSV_SIMPLE_CLASSPATH));
  colInfo.registerColumnType(CSV_COL_B, ColumnType.LONG);
  colInfo.registerColumnType(CSV_COL_C, ColumnType.DOUBLE);
  // WHEN
  // loading table
  TableShard table = Iterables.getOnlyElement(csvLoader.load(0L, buf, "Test", colInfo));
  // THEN
  Assert.assertEquals(table.getNumberOfRowsInShard(), 4, "Expected 4 rows");
  Assert.assertNotNull(table.getStringColumns().get(CSV_COL_A), "Expected String column");
  Assert.assertNotNull(table.getLongColumns().get(CSV_COL_B), "Expected Long column");
  Assert.assertNotNull(table.getDoubleColumns().get(CSV_COL_C), "Expected Double column");
  @SuppressWarnings("unchecked")
  List<String> colAValues = resolveAllValues(table.getStringColumns().get(CSV_COL_A));
  @SuppressWarnings("unchecked")
  List<Long> colBValues = resolveAllValues(table.getLongColumns().get(CSV_COL_B));
  @SuppressWarnings("unchecked")
  List<Double> colCValues = resolveAllValues(table.getDoubleColumns().get(CSV_COL_C));
  Assert.assertEquals(new HashSet<String>(colAValues).size(), colAValues.size(),
      "Duplicate values in column not expected");
  Assert.assertEquals(new HashSet<Long>(colBValues).size(), colBValues.size(),
      "Duplicate values in column not expected");
  Assert.assertEquals(new HashSet<Double>(colCValues).size(), colCValues.size(),
      "Duplicate values in column not expected");
  Assert.assertEquals(new HashSet<String>(colAValues),
      new HashSet<String>(Arrays.asList(new String[] { "1", "2", "3", "4" })),
      "Different values expected (inspect data type!)");
  Assert.assertEquals(new HashSet<Long>(colBValues), new HashSet<Long>(Arrays.asList(new Long[] { 1L, 2L, 3L, 4L })),
      "Different values expected (inspect data type!)");
  Assert.assertEquals(new HashSet<Double>(colCValues),
      new HashSet<Double>(Arrays.asList(new Double[] { 1., 2., 3., 4. })),
      "Different values expected (inspect data type!)");
}