Add UT for Downsample functions.
Merge pull request #1309 from zhilwang/downsample-ut

Add UT for Downsample functions.