Added tests for resource manager. Closes #118.