Tests: implement common method for generation of View