Refactored configurator generation into an AbstractGenerator implementation and added a test for its functionality