add tests for view class