reading this doesn't make much sense, that is why I would use the `getBeanFactory` and then `return $beanFactory;`, that way we can mock the `BeanFactory` and reuse in other tests.