ContainerBuilder: added test for generated factory as a service factory