### Question:
ReportStatusActionImpl implements StatusAction { public void doAction(GatewayResponse response) { if (response.getRequestId() == null || response.getRequestId().isEmpty()) { return; } if (response.getRecipientNumber() == null || response.getRecipientNumber().isEmpty()) { return; } try { if (response.getMessageStatus() == MStatus.DELIVERED) { getRegWs().setMessageStatus(response.getRequestId(), true); } else if (response.getMessageStatus() == MStatus.FAILED) { getRegWs().setMessageStatus(response.getRequestId(), false); } } catch (Exception e) { logger.error("Error communicating with event engine", e); } }  void doAction(GatewayResponse response); RegistrarService getRegWs(); void setRegWs(RegistrarService regWs);  }### Answer:
@Test public void testDoAction(){ System.out.println("doAction"); GatewayRequestDetails grd = new GatewayRequestDetailsImpl(); grd.setId(17000000002l); GatewayRequest messageDetails = new GatewayRequestImpl(); messageDetails.setDateFrom(new Date()); messageDetails.setMessage("a message for testing"); messageDetails.setDateTo(new Date()); messageDetails.setRecipientsNumber("000000000000"); messageDetails.setGatewayRequestDetails(grd); GatewayResponse response = new GatewayResponseImpl(); response.setGatewayRequest(messageDetails); response.setGatewayMessageId("werfet54y56g645v4e"); response.setMessageStatus(MStatus.DELIVERED); response.setRecipientNumber("000000000000"); response.setResponseText("Some gateway response message"); response.setId(17000000003l); instance.doAction(response); }