improve code of generic tests
trim unnecessary code