Fixed view tests. Added test helper methods.