Add unit test for subclassing