### Question:
PipelineRun extends AbstractSecuredEntity { public void convertParamsToString(Map<String, PipeConfValueVO> parameters) { params = parameters .entrySet().stream() .map(entry -> { String param = entry.getKey() + KEY_VALUE_DELIMITER + entry.getValue().getValue(); if (StringUtils.hasText(entry.getValue().getType())) { param += KEY_VALUE_DELIMITER + (entry.getValue().getType()); } return param; }) .collect(Collectors.joining(PARAM_DELIMITER)); } PipelineRun();  PipelineRun(Long id, String name); Boolean isTerminating(); boolean isClusterRun(); void convertParamsToString(Map<String, PipeConfValueVO> parameters); void parseParameters(); Map<String, PipeConfValueVO> convertParamsToMap(); String getTaskName(); boolean hasTag(final String key); void addTag(final String key, final String value); void removeTag(final String key); static final String PARENT_ID_PARAM; static final String KEY_VALUE_DELIMITER; static final String PARAM_DELIMITER; static final String DEFAULT_PIPELINE_NAME; static final String GE_AUTOSCALING; }### Answer:
@Test public void shouldReturnValidStringWithoutType() { PipelineRun pipelineRun = new PipelineRun(); Map<String, PipeConfValueVO> params = new HashMap<>(); params.put(PARAM1_NAME, new PipeConfValueVO(PARAM1_VALUE, null)); params.put(PARAM2_NAME, new PipeConfValueVO(PARAM2_VALUE, null)); pipelineRun.convertParamsToString(params); assertThat(pipelineRun.getParams(), is(glueParams(glueParam(PARAM1_NAME, PARAM1_VALUE), glueParam(PARAM2_NAME, PARAM2_VALUE)))); }
@Test public void shouldReturnValidStringWithType() { PipelineRun pipelineRun = new PipelineRun(); Map<String, PipeConfValueVO> params = new HashMap<>(); params.put(PARAM1_NAME, new PipeConfValueVO(PARAM1_VALUE, PARAM1_TYPE)); params.put(PARAM2_NAME, new PipeConfValueVO(PARAM2_VALUE, PARAM2_TYPE)); pipelineRun.convertParamsToString(params); assertThat(pipelineRun.getParams(), is(glueParams(glueParam(PARAM1_NAME, PARAM1_VALUE, PARAM1_TYPE), glueParam(PARAM2_NAME, PARAM2_VALUE, PARAM2_TYPE)))); }