test_class.declarator: s_logger = LoggerFactory.getLogger(ListUsersCmdTest.class.getName())
test_class.modifier: public static final
test_class.original_string: public static final Logger s_logger = LoggerFactory.getLogger(ListUsersCmdTest.class.getName());
test_class.type: Logger
test_class.var_name: s_logger
test_class.declarator: queryService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private QueryService queryService;
test_class.type: QueryService
test_class.var_name: queryService
test_class.declarator: listUsersCmd = new ListUsersCmd()
test_class.modifier: @InjectMocks
      private final
test_class.original_string: @InjectMocks
      private final ListUsersCmd listUsersCmd = new ListUsersCmd();
test_class.type: ListUsersCmd
test_class.var_name: listUsersCmd
test_class.file: cosmic-core/api/src/test/java/com/cloud/api/command/admin/user/ListUsersCmdTest.java
test_class.identifier: ListUsersCmdTest
test_case.body: @Test
      public void testExecuteWithDefault() {
          final String secretKey = "Very secret key";
          ListResponse<UserResponse> responseList = new ListResponse<>();
          UserResponse response = new UserResponse();
  
          response.setSecretKey(secretKey);
          responseList.setResponses(Arrays.asList(response));
          when(queryService.searchForUsers(listUsersCmd)).thenReturn(responseList);
  
          listUsersCmd.execute();
          responseList = (ListResponse)listUsersCmd.getResponseObject();
          response = responseList.getResponses().get(0);
  
          assertFalse("SecretKey was revealed in ResponseObject, wasn't masked", secretKey.equals(response.getSecretKey()));
      }
test_case.class_method_signature: ListUsersCmdTest.testExecuteWithDefault()
test_case.full_signature: @Test public void testExecuteWithDefault()
test_case.identifier: testExecuteWithDefault
test_case.invocations: setSecretKey setResponses asList thenReturn when searchForUsers execute getResponseObject get getResponses assertFalse equals getSecretKey
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testExecuteWithDefault()
focal_class.declarator: s_logger = LoggerFactory.getLogger(ListUsersCmd.class.getName())
focal_class.modifier: public static final
focal_class.original_string: public static final Logger s_logger = LoggerFactory.getLogger(ListUsersCmd.class.getName());
focal_class.type: Logger
focal_class.var_name: s_logger
focal_class.declarator: s_name = "listusersresponse"
focal_class.modifier: private static final
focal_class.original_string: private static final String s_name = "listusersresponse";
focal_class.type: String
focal_class.var_name: s_name
focal_class.declarator: accountType
focal_class.modifier: @Parameter(name = ApiConstants.ACCOUNT_TYPE,
              type = CommandType.LONG,
              description = "List users by account type. Valid types include admin, domain-admin, read-only-admin, or user.")
      private
focal_class.original_string: @Parameter(name = ApiConstants.ACCOUNT_TYPE,
              type = CommandType.LONG,
              description = "List users by account type. Valid types include admin, domain-admin, read-only-admin, or user.")
      private Long accountType;
focal_class.type: Long
focal_class.var_name: accountType
focal_class.declarator: id
focal_class.modifier: @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserResponse.class, description = "List user by ID.")
      private
focal_class.original_string: @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserResponse.class, description = "List user by ID.")
      private Long id;
focal_class.type: Long
focal_class.var_name: id
focal_class.declarator: state
focal_class.modifier: @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "List users by state of the user account.")
      private
focal_class.original_string: @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "List users by state of the user account.")
      private String state;
focal_class.type: String
focal_class.var_name: state
focal_class.declarator: username
focal_class.modifier: @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, description = "List user by the username")
      private
focal_class.original_string: @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, description = "List user by the username")
      private String username;
focal_class.type: String
focal_class.var_name: username
focal_class.file: cosmic-core/api/src/main/java/com/cloud/api/command/admin/user/ListUsersCmd.java
focal_class.identifier: ListUsersCmd
focal_class.class_method_signature: ListUsersCmd.getAccountType()
focal_class.full_signature: public Long getAccountType()
focal_class.identifier: getAccountType
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Long
focal_class.signature: Long getAccountType()
focal_class.class_method_signature: ListUsersCmd.getId()
focal_class.full_signature: public Long getId()
focal_class.identifier: getId
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Long
focal_class.signature: Long getId()
focal_class.class_method_signature: ListUsersCmd.getState()
focal_class.full_signature: public String getState()
focal_class.identifier: getState
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getState()
focal_class.class_method_signature: ListUsersCmd.getUsername()
focal_class.full_signature: public String getUsername()
focal_class.identifier: getUsername
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getUsername()
focal_class.class_method_signature: ListUsersCmd.execute()
focal_class.full_signature: @Override public void execute()
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void execute()
focal_class.class_method_signature: ListUsersCmd.getCommandName()
focal_class.full_signature: @Override public String getCommandName()
focal_class.identifier: getCommandName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getCommandName()
focal_class.superclass: extends BaseListAccountResourcesCmd
focal_method.body: @Override
      public void execute() {
          final ListResponse<UserResponse> response = _queryService.searchForUsers(this);
          response.setResponseName(getCommandName());
          List<UserResponse> responseList = response.getResponses();
  
          if (responseList != null && responseList.size() > 0) {
              for (UserResponse userResponse : responseList) {
                  if (StringUtils.isNotBlank(userResponse.getSecretKey())) {
                      userResponse.setSecretKey("SecretKey only visible when generating a new key");
                  }
              }
          }
          this.setResponseObject(response);
      }
focal_method.class_method_signature: ListUsersCmd.execute()
focal_method.full_signature: @Override public void execute()
focal_method.identifier: execute
focal_method.invocations: searchForUsers setResponseName getCommandName getResponses size isNotBlank getSecretKey setSecretKey setResponseObject
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void execute()