@Test public void testSaveResponse() { System.out.println("saveResponse"); GatewayResponse response = new GatewayResponseImpl(); response.setGatewayMessageId("werfet54y56g645v4e"); response.setMessageStatus(MStatus.PENDING); response.setRecipientNumber("000000000000"); response.setResponseText("Some gateway response message"); response.setId(32000000001l); mockResponseDAO = createMock(GatewayResponseDAO.class); expect( mockCore.createGatewayResponseDAO() ).andReturn(mockResponseDAO); expect( mockResponseDAO.merge((GatewayRequest) anyObject()) ).andReturn(response); replay(mockCore, mockResponseDAO); instance.saveResponse(response); verify(mockCore, mockResponseDAO); }
public void saveResponse(GatewayResponse gatewayResponse) { logger.debug("Initializing DAO"); GatewayResponseDAO gatewayResponseDAO = coreManager.createGatewayResponseDAO(); logger.debug("Caching response"); logger.debug(gatewayResponse); gatewayResponseDAO.merge(gatewayResponse); }
SMSCacheServiceImpl implements CacheService { public void saveResponse(GatewayResponse gatewayResponse) { logger.debug("Initializing DAO"); GatewayResponseDAO gatewayResponseDAO = coreManager.createGatewayResponseDAO(); logger.debug("Caching response"); logger.debug(gatewayResponse); gatewayResponseDAO.merge(gatewayResponse); } }
SMSCacheServiceImpl implements CacheService { public void saveResponse(GatewayResponse gatewayResponse) { logger.debug("Initializing DAO"); GatewayResponseDAO gatewayResponseDAO = coreManager.createGatewayResponseDAO(); logger.debug("Caching response"); logger.debug(gatewayResponse); gatewayResponseDAO.merge(gatewayResponse); }  }
SMSCacheServiceImpl implements CacheService { public void saveResponse(GatewayResponse gatewayResponse) { logger.debug("Initializing DAO"); GatewayResponseDAO gatewayResponseDAO = coreManager.createGatewayResponseDAO(); logger.debug("Caching response"); logger.debug(gatewayResponse); gatewayResponseDAO.merge(gatewayResponse); }  void saveMessage(GatewayRequest gatewayRequest); void mergeMessage(GatewayRequest gatewayRequest); void mergeMessage(MessageRequest messageRequest); void saveMessage(GatewayRequestDetails gatewayRequestDetails); void saveResponse(GatewayResponse gatewayResponse); List<GatewayRequest> getMessages(GatewayRequest gatewayRequest); List<GatewayRequest> getMessagesByStatus(MStatus mStatus); List<GatewayRequest> getMessagesByStatusAndSchedule(MStatus mStatus, Date date); List<GatewayResponse> getResponses(GatewayResponse gatewayResponse); CoreManager getCoreManager(); void setCoreManager(CoreManager coreManager); }
SMSCacheServiceImpl implements CacheService { public void saveResponse(GatewayResponse gatewayResponse) { logger.debug("Initializing DAO"); GatewayResponseDAO gatewayResponseDAO = coreManager.createGatewayResponseDAO(); logger.debug("Caching response"); logger.debug(gatewayResponse); gatewayResponseDAO.merge(gatewayResponse); }  void saveMessage(GatewayRequest gatewayRequest); void mergeMessage(GatewayRequest gatewayRequest); void mergeMessage(MessageRequest messageRequest); void saveMessage(GatewayRequestDetails gatewayRequestDetails); void saveResponse(GatewayResponse gatewayResponse); List<GatewayRequest> getMessages(GatewayRequest gatewayRequest); List<GatewayRequest> getMessagesByStatus(MStatus mStatus); List<GatewayRequest> getMessagesByStatusAndSchedule(MStatus mStatus, Date date); List<GatewayResponse> getResponses(GatewayResponse gatewayResponse); CoreManager getCoreManager(); void setCoreManager(CoreManager coreManager);  }