@Test public void test_should_update_meterStatus_and_push_to_queue() { when(applicationProperties.getUpdateMeterStatusTopicName()).thenReturn("egov.wcms.meterstatus-update"); meterStatusRepository.pushUpdateToQueue(getMeterStatusRequestForUpdate()); verify(kafkaTemplate).send("egov.wcms.meterstatus-update", getMeterStatusRequestForUpdate()); }
public List<MeterStatus> pushUpdateToQueue(final MeterStatusReq meterStatusRequest) { logger.info("Sending MeterStatusRequest to queue"); try { kafkaTemplate.send(applicationProperties.getUpdateMeterStatusTopicName(), meterStatusRequest); } catch (final Exception e) { logger.error("Exception encountered:" + e); } return meterStatusRequest.getMeterStatus(); }
MeterStatusRepository { public List<MeterStatus> pushUpdateToQueue(final MeterStatusReq meterStatusRequest) { logger.info("Sending MeterStatusRequest to queue"); try { kafkaTemplate.send(applicationProperties.getUpdateMeterStatusTopicName(), meterStatusRequest); } catch (final Exception e) { logger.error("Exception encountered:" + e); } return meterStatusRequest.getMeterStatus(); } }
MeterStatusRepository { public List<MeterStatus> pushUpdateToQueue(final MeterStatusReq meterStatusRequest) { logger.info("Sending MeterStatusRequest to queue"); try { kafkaTemplate.send(applicationProperties.getUpdateMeterStatusTopicName(), meterStatusRequest); } catch (final Exception e) { logger.error("Exception encountered:" + e); } return meterStatusRequest.getMeterStatus(); }  }
MeterStatusRepository { public List<MeterStatus> pushUpdateToQueue(final MeterStatusReq meterStatusRequest) { logger.info("Sending MeterStatusRequest to queue"); try { kafkaTemplate.send(applicationProperties.getUpdateMeterStatusTopicName(), meterStatusRequest); } catch (final Exception e) { logger.error("Exception encountered:" + e); } return meterStatusRequest.getMeterStatus(); }  List<MeterStatus> pushCreateToQueue(final MeterStatusReq meterStatusReq); MeterStatusReq create(final MeterStatusReq meterStatusRequest); List<MeterStatus> pushUpdateToQueue(final MeterStatusReq meterStatusRequest); MeterStatusReq update(final MeterStatusReq meterStatusRequest); List<MeterStatus> getMeterStatusByCriteria(final MeterStatusGetRequest meterStatusGetRequest); }
MeterStatusRepository { public List<MeterStatus> pushUpdateToQueue(final MeterStatusReq meterStatusRequest) { logger.info("Sending MeterStatusRequest to queue"); try { kafkaTemplate.send(applicationProperties.getUpdateMeterStatusTopicName(), meterStatusRequest); } catch (final Exception e) { logger.error("Exception encountered:" + e); } return meterStatusRequest.getMeterStatus(); }  List<MeterStatus> pushCreateToQueue(final MeterStatusReq meterStatusReq); MeterStatusReq create(final MeterStatusReq meterStatusRequest); List<MeterStatus> pushUpdateToQueue(final MeterStatusReq meterStatusRequest); MeterStatusReq update(final MeterStatusReq meterStatusRequest); List<MeterStatus> getMeterStatusByCriteria(final MeterStatusGetRequest meterStatusGetRequest); static final Logger logger; }