Remove unused code
Convert sample to test Case