@Test public void test_Should_Update_ReceivingModeType_NotNull() throws Exception { final ReceivingModeTypeReq receivingModeTypeRequest = new ReceivingModeTypeReq(); final RequestInfo requestInfo = new RequestInfo(); final User user = new User(); user.setId(1L); requestInfo.setUserInfo(user); final ReceivingModeType receivingModeType = new ReceivingModeType(); final AuditDetails auditDetails = new AuditDetails(); receivingModeType.setAuditDetails(auditDetails); receivingModeType.setCode("10"); receivingModeType.setActive(true); receivingModeType.getAuditDetails().setCreatedBy(1L); receivingModeType.setName("test name"); receivingModeType.setDescription("test description"); receivingModeTypeRequest.setRequestInfo(requestInfo); receivingModeTypeRequest.setModeType(receivingModeType); final ReceivingModeType receivingModeTypeResult = receivingModeTypeService.sendMessage("topic", "key", receivingModeTypeRequest); assertNotNull(receivingModeTypeResult); }
public ReceivingModeType sendMessage(String topic, String key, final ReceivingModeTypeReq modeTypeRequest) { final ObjectMapper mapper = new ObjectMapper(); String receivingModeValue = null; try { logger.info("createReceivingCModeType Request::" + modeTypeRequest); receivingModeValue = mapper.writeValueAsString(modeTypeRequest); logger.info("receivingModeValue::" + receivingModeValue); } catch (final JsonProcessingException e) { logger.error("Exception Encountered : " + e); } try { pgrProducer.sendMessage(topic, key, receivingModeValue); } catch (final Exception ex) { logger.error("Exception Encountered : " + ex); } return modeTypeRequest.getModeType(); }
ReceivingModeTypeService { public ReceivingModeType sendMessage(String topic, String key, final ReceivingModeTypeReq modeTypeRequest) { final ObjectMapper mapper = new ObjectMapper(); String receivingModeValue = null; try { logger.info("createReceivingCModeType Request::" + modeTypeRequest); receivingModeValue = mapper.writeValueAsString(modeTypeRequest); logger.info("receivingModeValue::" + receivingModeValue); } catch (final JsonProcessingException e) { logger.error("Exception Encountered : " + e); } try { pgrProducer.sendMessage(topic, key, receivingModeValue); } catch (final Exception ex) { logger.error("Exception Encountered : " + ex); } return modeTypeRequest.getModeType(); } }
ReceivingModeTypeService { public ReceivingModeType sendMessage(String topic, String key, final ReceivingModeTypeReq modeTypeRequest) { final ObjectMapper mapper = new ObjectMapper(); String receivingModeValue = null; try { logger.info("createReceivingCModeType Request::" + modeTypeRequest); receivingModeValue = mapper.writeValueAsString(modeTypeRequest); logger.info("receivingModeValue::" + receivingModeValue); } catch (final JsonProcessingException e) { logger.error("Exception Encountered : " + e); } try { pgrProducer.sendMessage(topic, key, receivingModeValue); } catch (final Exception ex) { logger.error("Exception Encountered : " + ex); } return modeTypeRequest.getModeType(); }  }
ReceivingModeTypeService { public ReceivingModeType sendMessage(String topic, String key, final ReceivingModeTypeReq modeTypeRequest) { final ObjectMapper mapper = new ObjectMapper(); String receivingModeValue = null; try { logger.info("createReceivingCModeType Request::" + modeTypeRequest); receivingModeValue = mapper.writeValueAsString(modeTypeRequest); logger.info("receivingModeValue::" + receivingModeValue); } catch (final JsonProcessingException e) { logger.error("Exception Encountered : " + e); } try { pgrProducer.sendMessage(topic, key, receivingModeValue); } catch (final Exception ex) { logger.error("Exception Encountered : " + ex); } return modeTypeRequest.getModeType(); }  ReceivingModeTypeReq create(final ReceivingModeTypeReq modeTypeReq); ReceivingModeTypeReq update(final ReceivingModeTypeReq modeTypeReq); List<ReceivingModeType> getAllReceivingModeTypes(final ReceivingModeTypeGetReq modeTypeGetRequest); boolean checkReceivingModeTypeByNameAndCode(final String code, final String name, final String tenantId, String mode); boolean checkReceivingModeTypeByName(final String code, final String name, final String tenantId, final String mode); boolean checkReceivingModeTypeByCode(final String code, final String tenantId, final String mode); ReceivingModeType sendMessage(String topic, String key, final ReceivingModeTypeReq modeTypeRequest); }
ReceivingModeTypeService { public ReceivingModeType sendMessage(String topic, String key, final ReceivingModeTypeReq modeTypeRequest) { final ObjectMapper mapper = new ObjectMapper(); String receivingModeValue = null; try { logger.info("createReceivingCModeType Request::" + modeTypeRequest); receivingModeValue = mapper.writeValueAsString(modeTypeRequest); logger.info("receivingModeValue::" + receivingModeValue); } catch (final JsonProcessingException e) { logger.error("Exception Encountered : " + e); } try { pgrProducer.sendMessage(topic, key, receivingModeValue); } catch (final Exception ex) { logger.error("Exception Encountered : " + ex); } return modeTypeRequest.getModeType(); }  ReceivingModeTypeReq create(final ReceivingModeTypeReq modeTypeReq); ReceivingModeTypeReq update(final ReceivingModeTypeReq modeTypeReq); List<ReceivingModeType> getAllReceivingModeTypes(final ReceivingModeTypeGetReq modeTypeGetRequest); boolean checkReceivingModeTypeByNameAndCode(final String code, final String name, final String tenantId, String mode); boolean checkReceivingModeTypeByName(final String code, final String name, final String tenantId, final String mode); boolean checkReceivingModeTypeByCode(final String code, final String tenantId, final String mode); ReceivingModeType sendMessage(String topic, String key, final ReceivingModeTypeReq modeTypeRequest); static final Logger logger; }