MessageUtil { public static String getMessageString(String key) { return NONLS_MESSAGE_RESOURCE_BUNDLE.getString(key); }  static String getMessageString(String key); static String getMessageString(String key, Object... params); static String getMessageString(String key, Locale locale); static String getMessageString(String key, Locale locale, Object... params); final static String RestResponseErrorMsg_build_JSON_error; final static String RestResponseErrorMsg_parse_JSON_error; final static String RestResponseErrorMsg_config_exist_error; final static String RestResponseErrorMsg_policy_not_found_error; final static String RestResponseErrorMsg_applist_not_empty_error; final static String RestResponseErrorMsg_app_not_found_error; final static String RestResponseErrorMsg_cloud_error; final static String RestResponseErrorMsg_metric_not_supported_error; final static String RestResponseErrorMsg_database_error; final static String RestResponseErrorMsg_no_attached_policy_error; final static String RestResponseErrorMsg_call_bss_fail_error; final static String RestResponseErrorMsg_app_info_not_found_error; final static String RestResponseErrorMsg_service_not_found_error; final static String RestResponseErrorMsg_internal_server_error; final static String RestResponseErrorMsg_input_json_parse_error; final static String RestResponseErrorMsg_input_json_format_error; final static String RestResponseErrorMsg_input_json_format_location_error; final static String RestResponseErrorMsg_output_json_parse_error; final static String RestResponseErrorMsg_output_json_format_error; final static String RestResponseErrorMsg_policy_not_exist_error; final static String RestResponseErrorMsg_internal_authentication_failed_error; final static String RestResponseErrorMsg_retrieve_application_service_information_context; final static String RestResponseErrorMsg_retrieve_org_sapce_information_context; final static String RestResponseErrorMsg_parse_input_json_context; final static String RestResponseErrorMsg_Create_Update_Policy_context; final static String RestResponseErrorMsg_Enable_Policy_context; final static String RestResponseErrorMsg_Get_Policy_context; final static String RestResponseErrorMsg_Get_Scaling_History_context; final static String RestResponseErrorMsg_Get_Metric_Data_context; final static String RestResponseErrorMsg_update_policy_in_Create_Policy_context; final static String RestResponseErrorMsg_create_policy_in_Create_Policy_context; final static String RestResponseErrorMsg_attach_policy_in_Create_Policy_context; final static String RestResponseErrorMsg_detach_policy_in_Delete_Policy_context; final static String RestResponseErrorMsg_delete_policy_in_Delete_Policy_context; final static String RestResponseErrorMsg_get_policy_in_Get_Policy_context; final static String RestResponseErrorMsg_enable_policy_in_Enable_Policy_context; final static String RestResponseErrorMsg_get_history_in_Get_History_context; final static String RestResponseErrorMsg_get_metric_in_Get_Metric_context; final static String RestResponseErrorMsg_API_Server_retrieve_service_information_context; }
@Test public void messageTest() throws InterruptedException { assertEquals("CWSCV6001E: The API server cannot parse the input JSON strings for API: Create/Update Policy.", MessageUtil.getMessageString(MessageUtil.RestResponseErrorMsg_input_json_parse_error, Locale.US, "Create/Update Policy")); assertEquals("CWSCV6002E: The API server cannot parse the output JSON strings for API: Get Policy.", MessageUtil.getMessageString(MessageUtil.RestResponseErrorMsg_output_json_parse_error, Locale.US, "Get Policy")); assertEquals("CWSCV6003E: Input JSON strings format error: type error in the input JSON for API: Create/Update Policy.", MessageUtil.getMessageString(MessageUtil.RestResponseErrorMsg_input_json_format_error, Locale.US, "type error", "Create/Update Policy")); assertEquals("CWSCV6004E: Output JSON strings format error: type mismatch in the output JSON for API: Get Metric Data.", MessageUtil.getMessageString(MessageUtil.RestResponseErrorMsg_output_json_format_error, Locale.US, "type mismatch", "Get Metric Data")); assertEquals("CWSCV6005E: Internal server error occurred during retrieve application service information.", MessageUtil.getMessageString(MessageUtil.RestResponseErrorMsg_internal_server_error, Locale.US, "retrieve application service information")); assertEquals("CWSCV6006E: Calling CloudFoundry APIs failed: Get App Env.", MessageUtil.getMessageString(MessageUtil.RestResponseErrorMsg_cloud_error, Locale.US, "Get App Env")); assertEquals("CWSCV6007E: The application is not found: d76e90be-15fb-43ac-b9d7-78f81918d77a.", MessageUtil.getMessageString(MessageUtil.RestResponseErrorMsg_app_not_found_error, Locale.US, "d76e90be-15fb-43ac-b9d7-78f81918d77a")); assertEquals("CWSCV6008E: The following error occurred when retrieving information for application 4367e821-af9e-44ac-ba3d-dc2c15efc527: Could not find specfic matching space for app.", MessageUtil.getMessageString(MessageUtil.RestResponseErrorMsg_app_info_not_found_error, Locale.US, "4367e821-af9e-44ac-ba3d-dc2c15efc527", "Could not find specfic matching space for app")); assertEquals("CWSCV6009E: Service: CF-AutoScaler for App d76e90be-15fb-43ac-b9d7-78f81918d77a is not found.", MessageUtil.getMessageString(MessageUtil.RestResponseErrorMsg_service_not_found_error, Locale.US, "CF-AutoScaler", "d76e90be-15fb-43ac-b9d7-78f81918d77a")); assertEquals("CWSCV6010E: Policy for App 4367e821-af9e-44ac-ba3d-dc2c15efc527 is not found.", MessageUtil.getMessageString(MessageUtil.RestResponseErrorMsg_policy_not_exist_error, Locale.US, "4367e821-af9e-44ac-ba3d-dc2c15efc527")); assertEquals("CWSCV6011E: Internal Authentication failed during Enable Policy.", MessageUtil.getMessageString(MessageUtil.RestResponseErrorMsg_internal_authentication_failed_error, Locale.US, "Enable Policy")); assertEquals("CWSCV6012E: Format error at line 3 column 5 in the input JSON strings for API: Create/Update Policy.", MessageUtil.getMessageString(MessageUtil.RestResponseErrorMsg_input_json_format_location_error, Locale.US, "Create/Update Policy", "3", "5")); }