### Question:
StatusHandlerImpl implements StatusHandler { public void handleStatus(GatewayResponse response) { List<StatusAction> actions = actionRegister.get(response.getMessageStatus()); if (actions != null) { for (StatusAction action : actions) { action.doAction(response); } } }  void handleStatus(GatewayResponse response); boolean registerStatusAction(MStatus status, StatusAction action); Map<MStatus, List<StatusAction>> getActionRegister(); void setActionRegister(Map<MStatus, List<StatusAction>> registry);  }### Answer:
@Test public void testHandleStatus(){ System.out.println("handleStatus"); GatewayResponse response = new GatewayResponseImpl(); response.setGatewayMessageId("DoActionwerfet54y56g645v4e"); response.setMessageStatus(MStatus.DELIVERED); response.setRecipientNumber("000000000000"); response.setResponseText("Some gateway response message"); response.setId(18000000001l); List<StatusAction> actionList = new ArrayList<StatusAction>(); actionList.add(mockAction); expect( mockRegister.get((MStatus) anyObject()) ).andReturn(actionList); mockAction.doAction(response); expectLastCall(); replay(mockRegister, mockAction); instance.handleStatus(response); verify(mockRegister, mockAction); }