### Question:
Message { public ApiMessage mapToApiMessage() { return new ApiMessage( requestedKey, messageTemplate.getType(), messageTemplate.getNumber() + messageTemplate.getType().toChar(), getConvertedText()); } private  Message(String requestedKey,
                    MessageTemplate messageTemplate,
                    Object[] messageParameters); static Message of(String requestedKey,
                             MessageTemplate messageTemplate,
                             Object[] messageParameters); String getConvertedText(); String mapToReadableText(); ApiMessageView mapToView(); ApiMessage mapToApiMessage(); String mapToLogMessage(); MessageTemplate getMessageTemplate(); static final String INVALID_KEY_MESSAGE; static final String INVALID_MESSAGE_TEXT_FORMAT; }### Answer:
@Test public void testMapToApiMessage() { ApiMessage actualApiMessage = message.mapToApiMessage(); String expectedReadableText = "No response received within the allowed time: 3000"; ApiMessage expectedApiMessage = new ApiMessage("org.zowe.apiml.common.serviceTimeout", MessageType.ERROR, "ZWEAM700E", expectedReadableText); assertEquals("ApiMessage is different", expectedApiMessage, actualApiMessage); }