ListMembersCommand extends GfshCommand { String getCoordinatorId() { InternalDistributedSystem ids = InternalDistributedSystem.getConnectedInstance(); if (ids == null || !ids.isConnected()) { return null; } Distribution mmgr = ids.getDistributionManager().getDistribution(); if (mmgr == null) { return null; } return mmgr.getCoordinator().getUniqueId(); }  @CliCommand(value = {CliStrings.LIST_MEMBER}, help = CliStrings.LIST_MEMBER__HELP) @CliMetaData(relatedTopic = CliStrings.TOPIC_GEODE_SERVER) @ResourceOperation(resource = ResourcePermission.Resource.CLUSTER, operation = ResourcePermission.Operation.READ) ResultModel listMember(@CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
      optionContext = ConverterHint.MEMBERGROUP,
      help = CliStrings.LIST_MEMBER__GROUP__HELP) String[] groups); static final String MEMBERS_SECTION; }
@Test public void noCoordinator() { members.add(member1); doReturn(null).when(command).getCoordinatorId(); Map<String, List<String>> table = gfsh.executeAndAssertThat(command, "list members") .hasTableSection().getActual().getContent(); assertThat(table.get("Name")).contains("name"); assertThat(table.get("Id")).contains("id"); }