Added variable check and data provider to test.