unit test for resource class