PreparationUtils { private static void prettyPrint(PreparationRepository repository, String stepId, OutputStream out) { if (stepId == null) { return; } try { Step step = repository.get(stepId, Step.class); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out)); writer.append("\t\tStep (").append(step.id()).append(")").append("\n"); writer.flush(); PreparationActions blob = repository.get(step.getContent(), PreparationActions.class); prettyPrint(blob, out); if (step.getParent() != null) { prettyPrint(repository, step.getParent(), out); } } catch (IOException e) { throw new TalendRuntimeException(BaseErrorCodes.UNEXPECTED_EXCEPTION, e); } }  static void prettyPrint(PreparationRepository repository, Preparation preparation, OutputStream out); static Collection<Identifiable> scatter(Identifiable source); List<String> listStepsIds(final String stepId, final PreparationRepository repository); List<String> listStepsIds(final String stepId, final String limit, final PreparationRepository repository); List<Step> listSteps(String headStepId, PreparationRepository repository); List<Step> listSteps(final Step step, final String limit, final PreparationRepository repository); static List<String> getPreparationIdForStepRowMetadata(final List<String> stepRowMetadataUpdated,
            final PreparationRepository repository);  }
@Test public void prettyPrint() throws Exception { final String version = versionService.version().getVersionId(); final List<Action> actions = getSimpleAction("uppercase", "column_name", "lastname"); final PreparationActions newContent = new PreparationActions(actions, version); final Step step = new Step(Step.ROOT_STEP.id(), newContent.id(), version); final Preparation preparation = new Preparation("#15325878", "1234", step.id(), version); repository.add(newContent); repository.add(step); repository.add(preparation); PreparationUtils.prettyPrint(repository, preparation, new NullOutputStream()); }