### Question:
GraphLookupStage extends AbstractLookupStage { @Override public Stream<Document> apply(Stream<Document> stream) { return stream.map(this::connectRemoteDocument); } GraphLookupStage(Document configuration, MongoDatabase mongoDatabase); @Override Stream<Document> apply(Stream<Document> stream);  }### Answer:
@Test void testGraphLookupObjectThatHasLinkedDocuments() { GraphLookupStage graphLookupStage = buildGraphLookupStage("from: 'employees', 'startWith': '$manager', 'connectFromField': 'manager', 'connectToField': 'name', 'as': 'managers', 'depthField': 'order'"); configureEmployeesCollection("name: 'Dave'", "_id: 2, name: 'Dave', manager: 'Mike'"); configureEmployeesCollection("name: 'Mike'", "_id: 1, name: 'Mike'"); Document document = json("name: 'Bob', manager: 'Dave'"); Stream<Document> result = graphLookupStage.apply(Stream.of(document)); assertThat(result).containsExactly( json("name: 'Bob', manager: 'Dave', managers: [{_id: 1, name: 'Mike', 'order': NumberLong(1)}, {_id: 2, name: 'Dave', 'manager': 'Mike', 'order': NumberLong(0)}]") ); }