rtypeA.loadNewVersion("2", retrieveRename(top, top + "003"));
rtypeB.loadNewVersion("2", retrieveRename(bot, bot + "003", top + "003:" + top));
// Check the registry looks right for Top
int topId = NameRegistry.getIdFor("superpkg/Top");
TypeRegistry trTop = TypeRegistry.getTypeRegistryFor(subLoader.getParent());
assertEquals(0, topId);
assertEquals(top, trTop.getReloadableType(topId).getName());
assertEquals(top, trTop.getReloadableType("superpkg/Top").getName());
int bottomId = NameRegistry.getIdFor("subpkg/Bottom");
TypeRegistry trBot = TypeRegistry.getTypeRegistryFor(subLoader);
assertEquals(1, bottomId);
assertEquals(bot, trBot.getReloadableType(bottomId).getName());
assertEquals(bot, trBot.getReloadableType("subpkg/Bottom").getName());
// Now call the m() in the Bottom003 type, which calls super.newMethodOnTop()
result = runUnguarded(rtypeB.getClazz(), "m");
assertEquals("newMethodOnTop() running", result.stdout);
}