Migrate DeepHierarchy tests to code gen.