add tests for view methods (Task2)