Update TestParallelANNgraphics.scala

Replaced deprecated "toArray" by "collect".