### Question:
AkkaStreamsDemo implements ReactiveStreamsDemo { public static List<Integer> doSquares() { final ActorSystem system = ActorSystem.create("squares"); final Materializer mat = ActorMaterializer.create(system); List<Integer> squares = new ArrayList<>(); Source.range(1, 64) .map(v -> v * v) .runForeach(squares::add, mat); try {Thread.sleep(300); } catch (Exception e) {} return squares; }  static List<Integer> doSquares(); static List<Integer> doParallelSquares(); static CompletionStage<ArrayList<Integer>> parallelSquares(); static Materializer createMaterializer(); @Override java.util.concurrent.Future<List<Integer>> doSquaresAsync(int count); @Override java.util.concurrent.Future<String> doStringConcatAsync(int count); @Override java.util.concurrent.Future<List<Integer>> doParallelSquaresAsync(int count); @Override java.util.concurrent.Future<String> doParallelStringConcatAsync(int count); void printErrors(); Source<String, NotUsed> getMessages(); void setChannel(Channel channel); Sink<String, CompletionStage<IOResult>> lineSink(String filename); void saveTextFile(List<String> text); Graph<SinkShape<String>, NotUsed> createFileSinkGraph(); void saveTextFileUsingGraph(List<String> text); final Collection<String> messageList; }### Answer:
@Test public void testDoSquares() { assertArrayEquals(squares.toArray(), demo.doSquares().toArray()); }