Add test cases for View class