### Question:
LevelsLoader { public static List<Level> getAlgorithmsOrderedByComplexity() { List<Class<? extends Level>> classes = loadClasses(); List<Level> result = createLevels(classes); sortByComplexity(result); return result; }  static List<Level> getAlgorithms(); static List<Level> getAlgorithmsOrderedByComplexity();  }### Answer:
@Test public void test() { List<Level> levels = LevelsLoader.getAlgorithmsOrderedByComplexity(); assertTrue(!levels.isEmpty()); for (Level level : levels) { Class<? extends Level> aClass = level.getClass(); assertFalse(Modifier.isAbstract(aClass.getModifiers())); assertFalse(Modifier.isInterface(aClass.getModifiers())); } assertEquals("HelloWorldAlgorithm, FizzBuzzAlgorithm, " + "SumSquareDifferenceAlgorithm, Sequence1Algorithm, " + "FibonacciNumbersAlgorithm, PrimeFactoryAlgorithm, " + "PowerDigitSumAlgorithm, MakeBricksAlgorithm, " + "FactorialAlgorithm, ReverseAddPalindromeAlgorithm, " + "Sequence2Algorithm, XthPrimeAlgorithm, " + "LongDivisionAlgorithm", levels.stream() .sorted(Comparator.comparingInt(Level::complexity)) .map(it -> it.getClass().getSimpleName()) .collect(Collectors.joining(", "))); }