Refactored to remove getBatchManager from Configuration. Added unit tests.