refactor - moved tests case to class and  method

Refactor test for better (clean) code.