Added tests for Type extension methods.
Fix in populating entity type hierarchy.