### Question:
ORServeGatewayMessageHandlerImpl implements GatewayMessageHandler { public MStatus lookupStatus(String code){ if(code.isEmpty()){ return MStatus.PENDING; } for(Entry<MStatus, String> entry: codeStatusMap.entrySet()){ if(entry.getValue().contains(code)){ return entry.getKey(); } } return MStatus.PENDING; }  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 testLookupStatus() { System.out.println("lookupStatus"); String messageStatus = " "; MStatus expResult = MStatus.PENDING; MStatus result = messageHandler.lookupStatus(messageStatus); assertEquals(expResult, result); messageStatus = "004"; expResult = MStatus.DELIVERED; result = messageHandler.lookupStatus(messageStatus); assertEquals(expResult, result); messageStatus = "007"; expResult = MStatus.FAILED; result = messageHandler.lookupStatus(messageStatus); assertEquals(expResult, result); messageStatus = "002"; expResult = MStatus.PENDING; result = messageHandler.lookupStatus(messageStatus); assertEquals(expResult, result); messageStatus = "006"; expResult = MStatus.CANCELLED; result = messageHandler.lookupStatus(messageStatus); assertEquals(expResult, result); messageStatus = "120"; expResult = MStatus.EXPIRED; result = messageHandler.lookupStatus(messageStatus); assertEquals(expResult, result); }