### Question:
GraphSageHelper { public static HugeObjectArray<double[]> initializeFeatures( Graph graph, Collection<String> nodePropertyNames, boolean useDegreeAsProperty, AllocationTracker tracker ) { var nodeProperties = nodePropertyNames .stream() .map(graph::nodeProperties) .collect(toList()); HugeObjectArray<double[]> features = HugeObjectArray.newArray( double[].class, graph.nodeCount(), tracker ); features.setAll(n -> { DoubleStream nodeFeatures = nodeProperties.stream().mapToDouble(p -> p.doubleValue(n)); if (useDegreeAsProperty) { nodeFeatures = DoubleStream.concat(nodeFeatures, DoubleStream.of(graph.degree(n))); } return nodeFeatures.toArray(); }); return features; } private  GraphSageHelper(); static HugeObjectArray<double[]> initializeFeatures(
        Graph graph,
        Collection<String> nodePropertyNames,
        boolean useDegreeAsProperty,
        AllocationTracker tracker
    );  }### Answer:
@Test void shouldInitializeFeaturesCorrectly() { RandomGraphGenerator randomGraphGenerator = RandomGraphGenerator.builder() .nodeCount(20) .averageDegree(3) .nodePropertyProducer(PropertyProducer.fixed("dummyProperty", 5D)) .relationshipDistribution(RelationshipDistribution.POWER_LAW) .seed(123L) .aggregation(Aggregation.SINGLE) .orientation(Orientation.UNDIRECTED) .allowSelfLoops(RandomGraphGeneratorConfig.AllowSelfLoops.NO) .allocationTracker(AllocationTracker.empty()) .build(); var graph = randomGraphGenerator.generate(); HugeObjectArray<double[]> properties = GraphSageHelper.initializeFeatures( graph, List.of("dummyProperty"), false, AllocationTracker.empty() ); assertNotNull(properties); for(int i = 0; i < properties.size(); i++) { double[] doubles = properties.get(i); assertArrayEquals(new double[] { 5D }, doubles ); } }