Added unit tests for resource