Fix loading of resources in test cases.