ScriptServiceUtil { public static Script transferObjectToScript(ScriptTO to) { Script s = new Script(); s.setComments(to.getComments()); s.setCreated(to.getCreated()); s.setCreator(to.getCreator()); s.setId(to.getId() != null ? to.getId() : 0); s.setModified(to.getModified()); s.setName(to.getName()); s.setProductName(to.getProductName()); s.setRuntime(to.getRuntime()); for (ScriptStepTO stepTo : to.getSteps()) { s.addStep(transferObjectToScriptStep(stepTo)); } return s; } 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 testTransferObjectToScript_1() throws Exception { ScriptTO to = new ScriptTO(); to.setProductName(""); to.setCreated(new Date()); to.setRuntime(1); to.setModified(new Date()); to.setName(""); to.setId(new Integer(1)); to.setSteps(new LinkedList()); to.setComments(""); to.setCreator(""); Script result = ScriptServiceUtil.transferObjectToScript(to); assertNotNull(result); }