Add some tests for resource APIs