ScriptServiceUtil { public static ScriptStepTO copy(ScriptStepTO step) { ScriptStepTO ret = new ScriptStepTO(); ret.setUuid(step.getUuid()); ret.setScriptGroupName(step.getScriptGroupName()); ret.setMethod(step.getMethod()); ret.setType(step.getType()); ret.setLabel(step.getLabel()); ret.setUrl(step.getUrl()); ret.setResult(step.getResult()); ret.setMimetype(step.getMimetype()); ret.setLoggingKey(step.getLoggingKey()); ret.setName(step.getName()); ret.setOnFail(step.getOnFail()); ret.setStepIndex(step.getStepIndex()); ret.setPayload(step.getPayload()); if (step.getResponse() != null) { try { ret.setResponse(URLEncoder.encode(step.getResponse(), "utf-8")); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } } ret.setSimplePath(step.getSimplePath()); ret.setHostname(step.getHostname()); ret.setProtocol(step.getProtocol()); ret.setComments(step.getComments()); ret.setRespFormat(step.getRespFormat()); ret.setReqFormat(step.getReqFormat()); ret.setData(copyData(step.getData())); ret.setPostDatas(copyData(step.getPostDatas())); ret.setQueryStrings(copyData(step.getQueryStrings())); ret.setRequestCookies(copyData(step.getRequestCookies())); ret.setRequestheaders(copyData(step.getRequestheaders())); ret.setResponseCookies(copyData(step.getResponseCookies())); ret.setResponseData(copyData(step.getResponseData())); ret.setResponseheaders(copyData(step.getResponseheaders())); return ret; } private  ScriptServiceUtil(); static ScriptTO scriptToTransferObject(Script script); static List<ScriptStepTO> scriptStepsToTransferobjectList(List<ScriptStep> steps); static Script transferObjectToScript(ScriptTO to); static ScriptStepTO scriptStepToTransferObject(ScriptStep step); static ScriptStepTO copy(ScriptStepTO step); static ScriptStep transferObjectToScriptStep(ScriptStepTO to); static StepDataTO requestDataToTransferObject(RequestData data); static StepDataTO copyStepDataTO(StepDataTO data); static RequestData transferObjectToRequestData(StepDataTO to); static ScriptDescription scriptToScriptDescription(Script script); static Script scriptDescriptionToScript(ScriptDescription sd); static ExternalScriptTO externalScriptToTO(ExternalScript script); static ExternalScript TOToExternalScript(ExternalScriptTO script);  }
@Test public void testCopy_1() throws Exception { ScriptStepTO step = new ScriptStepTO(); step.setType(""); step.setMimetype(""); step.setScriptGroupName(""); step.setPayload(""); step.setLoggingKey(""); step.setResult(""); step.setMethod(""); step.setName(""); step.setUrl(""); step.setOnFail(""); step.setStepIndex(1); step.setUuid(""); step.setLabel(""); step.setResponse(""); ScriptStepTO result = ScriptServiceUtil.copy(step); assertNotNull(result); }