I have developed some classes with similar behavior, they all implement the same interface. I implemented a factory that creates the appropriate object and returns the inte
Since I don't know how your factory method looks like, all I can advise right now is to
Check to see the object is the correct concrete implementation you were looking for:
IMyInterface fromFactory = factory.create(...);
Assert.assertTrue(fromFactory instanceof MyInterfaceImpl1);
You can check if the factory setup the concrete instances with valid instance variables.