public void testSelectByIndex() throws Exception {
ManageRealmCommand cmd = new ManageRealmCommand();
// set up two realms, each containing 1 module
Config realm1 = newConfigNamed("realm1");
realm1.setModules(new Module[] { newModuleNamed("module1") });
Config realm2 = newConfigNamed("realm2");
realm2.setModules(new Module[] { newModuleNamed("module2") });
Config[] realms = { realm1, realm2 };
doVerifyIndex(cmd, 1, realms);
doVerifyIndex(cmd, 2, realms);