@Test
public void testGetSourceDataFromLookupTable() {

    CubeManager cubeMgr = CubeManager.getInstance(getTestConfig());
    CubeInstance cube = cubeMgr.getCube(CUBE_NAME);
    Iterator<TableDesc> iterator = MetadataConverter.extractLookupTable(cube).iterator();
    while (iterator.hasNext()) {
        TableDesc lookup = iterator.next();
        NSparkCubingEngine.NSparkCubingSource cubingSource = new CsvSource().adaptToBuildEngine(NSparkCubingEngine.NSparkCubingSource.class);
        Dataset<Row> sourceData = cubingSource.getSourceData(lookup, ss, Maps.newHashMap());
        List<Row> rows = sourceData.collectAsList();
        Assert.assertTrue(rows != null && rows.size() > 0);
    }
}