private static IService CreateService(params object[] instances) =>
new Service(
instances.OfType<IDependency1>().SingleOrDefault() ?? new StubDependency1(),
instances.OfType<IDependency2>().SingleOrDefault() ?? new MockDependency2());