Modularized code for tests for resource listing