### Question:
ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse) { logger.debug("Parsing message gateway response"); logger.debug(gatewayResponse); if(message == null) return null; if(gatewayResponse.isEmpty()) return null; Set<GatewayResponse> responses = new HashSet<GatewayResponse>(); if(gatewayResponse.contains("error:") && gatewayResponse.contains("param:")){ gatewayResponse = gatewayResponse.trim().replace("\n", ""); } String[] responseLines = gatewayResponse.split("\n"); for(String line : responseLines){ String[] responseParts = line.split(" "); if(responseParts[0].equalsIgnoreCase("ID:")){ GatewayResponse response = getCoreManager().createGatewayResponse(); response.setGatewayMessageId(responseParts[1]); response.setRequestId(message.getRequestId()); response.setMessageStatus(MStatus.PENDING); response.setGatewayRequest(message); response.setResponseText(gatewayResponse); response.setDateCreated(new Date()); if(responseParts.length == 4) response.setRecipientNumber(responseParts[3]); else response.setRecipientNumber(message.getRecipientsNumber()); responses.add(response); } else{ logger.error("Gateway returned error: " + gatewayResponse); String errorCode = responseParts[1]; errorCode.replaceAll(",", ""); errorCode.trim(); MStatus status = lookupResponse(errorCode); GatewayResponse response = getCoreManager().createGatewayResponse(); response.setRequestId(message.getRequestId()); response.setMessageStatus(status); response.setGatewayRequest(message); response.setResponseText(gatewayResponse); response.setDateCreated(new Date()); responses.add(response); } } logger.debug(responses); return responses; }  Set<GatewayResponse> parseMessageResponse(GatewayRequest message, String gatewayResponse); MStatus parseMessageStatus(String gatewayResponse); MStatus lookupStatus(String code); MStatus lookupResponse(String code); CoreManager getCoreManager(); void setCoreManager(CoreManager coreManager); Map<MStatus, String> getCodeStatusMap(); void setCodeStatusMap(Map<MStatus, String> codeStatusMap); Map<MStatus, String> getCodeResponseMap(); void setCodeResponseMap(Map<MStatus, String> codeResponseMap);  }### Answer:
@Test public void testParseMessageResponse() { System.out.println("parseMessageResponse"); GatewayRequest message = null; String gatewayResponse = ""; GatewayRequest expResult = null; Set<GatewayResponse> result = messageHandler.parseMessageResponse(message, gatewayResponse); assertEquals(expResult, result); }