unit test for inheritance complete