Added unit tests for TypeRegistry.