### Question:
FossologyUtils { public static void ensureOrderOfProcessSteps(ExternalToolProcess fossologyProcess) { fossologyProcess.setProcessSteps(fossologyProcess.getProcessSteps().stream() .sorted(Comparator.comparing(s -> s.getStepName())).collect(Collectors.toList())); }  static void ensureOrderOfProcessSteps(ExternalToolProcess fossologyProcess); static final String FOSSOLOGY_STEP_NAME_UPLOAD; static final String FOSSOLOGY_STEP_NAME_SCAN; static final String FOSSOLOGY_STEP_NAME_REPORT; }### Answer:
@Test public void testEnsureOrderOfProcessSteps() { ExternalToolProcessStep stepReport = new ExternalToolProcessStep(); stepReport.setStepName(FossologyUtils.FOSSOLOGY_STEP_NAME_REPORT); ExternalToolProcessStep stepScan = new ExternalToolProcessStep(); stepScan.setStepName(FossologyUtils.FOSSOLOGY_STEP_NAME_SCAN); ExternalToolProcessStep stepUpload = new ExternalToolProcessStep(); stepUpload.setStepName(FossologyUtils.FOSSOLOGY_STEP_NAME_UPLOAD); ExternalToolProcess fossologyProcess = new ExternalToolProcess(); fossologyProcess.setProcessSteps(Stream.of(stepScan, stepReport, stepUpload).collect(Collectors.toList())); FossologyUtils.ensureOrderOfProcessSteps(fossologyProcess); assertThat(fossologyProcess.getProcessSteps(), Matchers.contains(stepUpload, stepScan, stepReport)); }