title: Unit testing an abstract factory that takes parameters
body: <p>Given a abstract factory implementation:</p>
  
  <pre><code>public class FooFactory : IFooFactory {
     public IFoo Create(object param1, object param2) {
        return new Foo(param1, param2);
     }
  }
  </code></pre>
  
  <p>What unit tests would be written for this class? How can I verify that param1 and param2 were forwarded to the creation of Foo? Do I have to make these public properties of Foo? Wouldn't that be breaking encapsulation? Or should I leave this to integration testing?</p>