Unit test for inheritance