test cases are done for scanner