ScriptServiceUtil { public static ScriptStep transferObjectToScriptStep(ScriptStepTO to) { ScriptStep ret = new ScriptStep(); ret.setComments(to.getComments()); ret.setHostname(to.getHostname()); ret.setUuid(to.getUuid()); ret.setLabel(to.getLabel()); ret.setMethod(to.getMethod()); ret.setMimetype(to.getMimetype()); ret.setLoggingKey(to.getLoggingKey()); ret.setPayload(to.getPayload()); if (to.getResponse() != null) { try { ret.setResponse(URLDecoder.decode(to.getResponse(), "utf-8")); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } } ret.setName(to.getName()); ret.setOnFail(to.getOnFail()); ret.setProtocol(to.getProtocol()); ret.setReqFormat(to.getReqFormat()); ret.setRespFormat(to.getRespFormat()); ret.setResult(to.getResult()); ret.setScriptGroupName(to.getScriptGroupName()); ret.setSimplePath(to.getSimplePath()); ret.setStepIndex(to.getStepIndex()); ret.setType(to.getType()); ret.setUrl(to.getUrl()); ret.setData(convertDataTO(to.getData())); ret.setPostDatas(convertDataTO(to.getPostDatas())); ret.setQueryStrings(convertDataTO(to.getQueryStrings())); ret.setRequestCookies(convertDataTO(to.getRequestCookies())); ret.setRequestheaders(convertDataTO(to.getRequestheaders())); ret.setResponseCookies(convertDataTO(to.getResponseCookies())); ret.setResponseData(convertDataTO(to.getResponseData())); ret.setResponseheaders(convertDataTO(to.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 testTransferObjectToScriptStep_1() throws Exception { ScriptStepTO to = new ScriptStepTO(); to.setMimetype(""); to.setComments(""); to.setPayload(""); to.setLoggingKey(""); to.setMethod(""); to.setUuid(""); to.setHostname(""); to.setLabel(""); to.setResponse(""); ScriptStep result = ScriptServiceUtil.transferObjectToScriptStep(to); assertNotNull(result); }