Added test for subclasses.