@Test public void testShouldSaveMarriageRegn(){ MarriageRegnRequest marriageRegnRequest=MarriageRegnRequest.builder().marriageRegn(getMarriageRegnFromDB().get(0)).build(); when(kafkaTemplate.send(any(String.class),any(Object.class))).thenReturn(new SendResult<>(null, null)); workflowRepository.saveMarriageRegn(marriageRegnRequest, "12"); }
public void saveMarriageRegn(MarriageRegnRequest marriageRegnRequest, String stateId) { log.info("WorkflowRepository saveMarriageRegn marriageRegnRequest"+marriageRegnRequest); marriageRegnRequest.getMarriageRegn().setStateId(stateId); try { kafkaTemplate.send(propertiesManager.getCreateMarriageRegnTopicName(), marriageRegnRequest); } catch (Exception exception) { log.info("AgreementService : " + exception.getMessage(), exception); throw exception; } }
WorkflowRepository { public void saveMarriageRegn(MarriageRegnRequest marriageRegnRequest, String stateId) { log.info("WorkflowRepository saveMarriageRegn marriageRegnRequest"+marriageRegnRequest); marriageRegnRequest.getMarriageRegn().setStateId(stateId); try { kafkaTemplate.send(propertiesManager.getCreateMarriageRegnTopicName(), marriageRegnRequest); } catch (Exception exception) { log.info("AgreementService : " + exception.getMessage(), exception); throw exception; } } }
WorkflowRepository { public void saveMarriageRegn(MarriageRegnRequest marriageRegnRequest, String stateId) { log.info("WorkflowRepository saveMarriageRegn marriageRegnRequest"+marriageRegnRequest); marriageRegnRequest.getMarriageRegn().setStateId(stateId); try { kafkaTemplate.send(propertiesManager.getCreateMarriageRegnTopicName(), marriageRegnRequest); } catch (Exception exception) { log.info("AgreementService : " + exception.getMessage(), exception); throw exception; } }  }
WorkflowRepository { public void saveMarriageRegn(MarriageRegnRequest marriageRegnRequest, String stateId) { log.info("WorkflowRepository saveMarriageRegn marriageRegnRequest"+marriageRegnRequest); marriageRegnRequest.getMarriageRegn().setStateId(stateId); try { kafkaTemplate.send(propertiesManager.getCreateMarriageRegnTopicName(), marriageRegnRequest); } catch (Exception exception) { log.info("AgreementService : " + exception.getMessage(), exception); throw exception; } }  ProcessInstance startWorkflow(MarriageRegnRequest marriageRegnRequest); void saveMarriageRegn(MarriageRegnRequest marriageRegnRequest, String stateId); TaskResponse updateWorkflow(MarriageRegnRequest marriageRegnRequest); void updateMarriagRegn(MarriageRegnRequest marriageRegnRequest); }
WorkflowRepository { public void saveMarriageRegn(MarriageRegnRequest marriageRegnRequest, String stateId) { log.info("WorkflowRepository saveMarriageRegn marriageRegnRequest"+marriageRegnRequest); marriageRegnRequest.getMarriageRegn().setStateId(stateId); try { kafkaTemplate.send(propertiesManager.getCreateMarriageRegnTopicName(), marriageRegnRequest); } catch (Exception exception) { log.info("AgreementService : " + exception.getMessage(), exception); throw exception; } }  ProcessInstance startWorkflow(MarriageRegnRequest marriageRegnRequest); void saveMarriageRegn(MarriageRegnRequest marriageRegnRequest, String stateId); TaskResponse updateWorkflow(MarriageRegnRequest marriageRegnRequest); void updateMarriagRegn(MarriageRegnRequest marriageRegnRequest); static final String ACTION; }