ResumeAsyncEventQueueDispatcherCommand extends GfshCommand { ResultModel constructResultModel(List<CliFunctionResult> results) { return ResultModel.createMemberStatusResult(results); }  @CliCommand(value = CliStrings.RESUME_ASYNCEVENTQUEUE, help = CliStrings.RESUME_ASYNCEVENTQUEUE__HELP) @ResourceOperation(resource = ResourcePermission.Resource.CLUSTER, operation = ResourcePermission.Operation.MANAGE) ResultModel resumeAsyncEventQueueDispatcher(
      @CliOption(key = CliStrings.RESUME_ASYNCEVENTQUEUE__ID,
          mandatory = true, help = CliStrings.RESUME_ASYNCEVENTQUEUE__ID__HELP) String queueId,

      @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
          optionContext = ConverterHint.MEMBERGROUP,
          help = CliStrings.RESUME_ASYNCEVENTQUEUE__GROUP__HELP) String[] onGroup,
      @CliOption(key = {CliStrings.MEMBER, CliStrings.MEMBERS},
          optionContext = ConverterHint.MEMBERIDNAME,
          help = CliStrings.RESUME_ASYNCEVENTQUEUE__MEMBER__HELP) String[] onMember);  }
@Test @SuppressWarnings("unchecked") public void resumeAsyncEventQueueSuccessful() { List<CliFunctionResult> functionResults = new ArrayList<>(); functionResults .add(new CliFunctionResult("member1", CliFunctionResult.StatusState.OK, "SUCCESS")); functionResults .add(new CliFunctionResult("member2", CliFunctionResult.StatusState.ERROR, "FAILURE")); doReturn(functionResults).when(command).executeAndGetFunctionResult(isA(Function.class), isA(Object.class), isA(Set.class)); doReturn(Collections.emptySet()).when(command).findMembers(any(), any()); gfsh.executeAndAssertThat(command, COMMAND + " --id=queueId"); verify(command).executeAndGetFunctionResult(isA(Function.class), isA(String.class), isA(Set.class)); verify(command).constructResultModel(functionResults); }