adding test for ResourceManager
move resourceManager
fix tests