Tests: implement common method for generation of list