@Test public void test_should_push_create_ServiceCharge_to_Queue() { when(codeGeneratorService.generate("SEQ_EGWTR_SERVICECHARGE")).thenReturn("1", "2", "3", "4"); when(serviceChargeRepository.pushCreateToQueue(getServiceChargeRequestAfterCodeAppend())) .thenReturn(getListOfServiceCharges()); assertTrue(getListOfServiceCharges().equals(serviceChargeService .pushCreateToQueue(getServiceChargeRequest()))); }
public List<ServiceCharge> pushCreateToQueue(final ServiceChargeReq serviceChargeRequest) { final List<ServiceCharge> serviceCharges = serviceChargeRequest.getServiceCharge(); for (final ServiceCharge serviceCharge : serviceCharges) serviceCharge.setCode(codeGeneratorService.generate(ServiceCharge.SEQ_SERVICECHARGE)); logger.info("ServiceChargeReq :" + serviceChargeRequest); final List<ServiceCharge> serviceChargess = serviceChargeRepository .pushCreateToQueue(serviceChargeRequest); return serviceChargess; }
ServiceChargeService { public List<ServiceCharge> pushCreateToQueue(final ServiceChargeReq serviceChargeRequest) { final List<ServiceCharge> serviceCharges = serviceChargeRequest.getServiceCharge(); for (final ServiceCharge serviceCharge : serviceCharges) serviceCharge.setCode(codeGeneratorService.generate(ServiceCharge.SEQ_SERVICECHARGE)); logger.info("ServiceChargeReq :" + serviceChargeRequest); final List<ServiceCharge> serviceChargess = serviceChargeRepository .pushCreateToQueue(serviceChargeRequest); return serviceChargess; } }
ServiceChargeService { public List<ServiceCharge> pushCreateToQueue(final ServiceChargeReq serviceChargeRequest) { final List<ServiceCharge> serviceCharges = serviceChargeRequest.getServiceCharge(); for (final ServiceCharge serviceCharge : serviceCharges) serviceCharge.setCode(codeGeneratorService.generate(ServiceCharge.SEQ_SERVICECHARGE)); logger.info("ServiceChargeReq :" + serviceChargeRequest); final List<ServiceCharge> serviceChargess = serviceChargeRepository .pushCreateToQueue(serviceChargeRequest); return serviceChargess; }  }
ServiceChargeService { public List<ServiceCharge> pushCreateToQueue(final ServiceChargeReq serviceChargeRequest) { final List<ServiceCharge> serviceCharges = serviceChargeRequest.getServiceCharge(); for (final ServiceCharge serviceCharge : serviceCharges) serviceCharge.setCode(codeGeneratorService.generate(ServiceCharge.SEQ_SERVICECHARGE)); logger.info("ServiceChargeReq :" + serviceChargeRequest); final List<ServiceCharge> serviceChargess = serviceChargeRepository .pushCreateToQueue(serviceChargeRequest); return serviceChargess; }  List<ServiceCharge> pushCreateToQueue(final ServiceChargeReq serviceChargeRequest); ServiceChargeReq create(final ServiceChargeReq serviceChargeRequest); List<ServiceCharge> pushUpdateToQueue(final ServiceChargeReq serviceChargeRequest); ServiceChargeReq update(final ServiceChargeReq serviceChargeRequest); List<ServiceCharge> getServiceChargesByCriteria(final ServiceChargeGetRequest serviceChargeGetRequest); }
ServiceChargeService { public List<ServiceCharge> pushCreateToQueue(final ServiceChargeReq serviceChargeRequest) { final List<ServiceCharge> serviceCharges = serviceChargeRequest.getServiceCharge(); for (final ServiceCharge serviceCharge : serviceCharges) serviceCharge.setCode(codeGeneratorService.generate(ServiceCharge.SEQ_SERVICECHARGE)); logger.info("ServiceChargeReq :" + serviceChargeRequest); final List<ServiceCharge> serviceChargess = serviceChargeRepository .pushCreateToQueue(serviceChargeRequest); return serviceChargess; }  List<ServiceCharge> pushCreateToQueue(final ServiceChargeReq serviceChargeRequest); ServiceChargeReq create(final ServiceChargeReq serviceChargeRequest); List<ServiceCharge> pushUpdateToQueue(final ServiceChargeReq serviceChargeRequest); ServiceChargeReq update(final ServiceChargeReq serviceChargeRequest); List<ServiceCharge> getServiceChargesByCriteria(final ServiceChargeGetRequest serviceChargeGetRequest); static final Logger logger; }