Extract ResourceManagerImpl and add test cases