added a unit test for nested classes