[FLINK-1208] Fix Nullpointer exception from class DataSourceTask and add some tests