Changed ConfigurableBeanFactory constructor to make it easier to inject mocks and implemented unit tests for it.