Interface for resource managers and implementation. Added tests for resource manager.