@Test public void test_throwException_Push_To_Producer_SupplyType() { final List<SupplyType> supplyTypeList = new ArrayList<>(); supplyTypeList.add(getSupplyType()); final SupplyTypeRequest supplyTypeRequest = new SupplyTypeRequest(); supplyTypeRequest.setSupplyTypes(supplyTypeList); assertTrue(supplyTypeList.equals(supplyTypeService.pushCreateToQueue("topic", "key", supplyTypeRequest))); }
public List<SupplyType> pushCreateToQueue(final String topic, final String key, final SupplyTypeRequest supplyTypeRequest) { for (final SupplyType supplyType : supplyTypeRequest.getSupplyTypes()) { supplyType.setCode(codeGeneratorService.generate(SupplyType.SEQ_SUPPLYTYPE)); } return mapRequestObjectToWaterProducer(topic, key, supplyTypeRequest); }
SupplyTypeService { public List<SupplyType> pushCreateToQueue(final String topic, final String key, final SupplyTypeRequest supplyTypeRequest) { for (final SupplyType supplyType : supplyTypeRequest.getSupplyTypes()) { supplyType.setCode(codeGeneratorService.generate(SupplyType.SEQ_SUPPLYTYPE)); } return mapRequestObjectToWaterProducer(topic, key, supplyTypeRequest); } }
SupplyTypeService { public List<SupplyType> pushCreateToQueue(final String topic, final String key, final SupplyTypeRequest supplyTypeRequest) { for (final SupplyType supplyType : supplyTypeRequest.getSupplyTypes()) { supplyType.setCode(codeGeneratorService.generate(SupplyType.SEQ_SUPPLYTYPE)); } return mapRequestObjectToWaterProducer(topic, key, supplyTypeRequest); }  }
SupplyTypeService { public List<SupplyType> pushCreateToQueue(final String topic, final String key, final SupplyTypeRequest supplyTypeRequest) { for (final SupplyType supplyType : supplyTypeRequest.getSupplyTypes()) { supplyType.setCode(codeGeneratorService.generate(SupplyType.SEQ_SUPPLYTYPE)); } return mapRequestObjectToWaterProducer(topic, key, supplyTypeRequest); }  SupplyTypeRequest create(final SupplyTypeRequest supplyTypeRequest); SupplyTypeRequest update(final SupplyTypeRequest supplyTypeRequest); List<SupplyType> pushCreateToQueue(final String topic, final String key,
            final SupplyTypeRequest supplyTypeRequest); List<SupplyType> pushUpdateToQueue(final String topic, final String key,
            final SupplyTypeRequest supplyTypeRequest); boolean getSupplyTypeByNameAndCode(final String code, final String name, final String tenantId); List<SupplyType> getSupplyTypes(final SupplyTypeGetRequest supplytypeGetRequest); }
SupplyTypeService { public List<SupplyType> pushCreateToQueue(final String topic, final String key, final SupplyTypeRequest supplyTypeRequest) { for (final SupplyType supplyType : supplyTypeRequest.getSupplyTypes()) { supplyType.setCode(codeGeneratorService.generate(SupplyType.SEQ_SUPPLYTYPE)); } return mapRequestObjectToWaterProducer(topic, key, supplyTypeRequest); }  SupplyTypeRequest create(final SupplyTypeRequest supplyTypeRequest); SupplyTypeRequest update(final SupplyTypeRequest supplyTypeRequest); List<SupplyType> pushCreateToQueue(final String topic, final String key,
            final SupplyTypeRequest supplyTypeRequest); List<SupplyType> pushUpdateToQueue(final String topic, final String key,
            final SupplyTypeRequest supplyTypeRequest); boolean getSupplyTypeByNameAndCode(final String code, final String name, final String tenantId); List<SupplyType> getSupplyTypes(final SupplyTypeGetRequest supplytypeGetRequest);  }