added a sample for inherits() and updated unit tests