### Question:
SMSCacheServiceImpl implements CacheService { public List<GatewayResponse> getResponses(GatewayResponse gatewayResponse) { GatewayResponseDAO responseDao = coreManager.createGatewayResponseDAO(); return responseDao.findByExample(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);  }### Answer:
@Test public void testGetResponses() { System.out.println("getResponses"); GatewayResponse response = new GatewayResponseImpl(); response.setGatewayMessageId("werfet54y56g645v4e"); response.setMessageStatus(MStatus.PENDING); response.setRecipientNumber("000000000000"); response.setResponseText("Some gateway response message"); mockResponseDAO = createMock(GatewayResponseDAO.class); expect( mockCore.createGatewayResponseDAO() ).andReturn(mockResponseDAO); expect( mockResponseDAO.findByExample((GatewayResponse) anyObject()) ).andReturn(new ArrayList<GatewayResponse>()); replay(mockCore, mockResponseDAO); List<GatewayResponse> result = instance.getResponses(response); assertNotNull(result); verify(mockCore, mockResponseDAO); }