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
if (myNewObject instanceof CorrectClass) { /* pass test */ }
update:
Don't know why this got marked down, so I'll expand it a bit...
public void doTest() { MyInterface inst = MyFactory.createAppropriateObject(); if (! inst instanceof ExpectedConcreteClass) { /* FAIL */ } }