issue-112: moved duplicated code in AnyObjectFactoryTest to a separate method, fixes #112