private CompletableFuture < NodeMultiZipper < ExecutionResultNode > > resolveNodes ( ExecutionContext executionContext , List < NodeMultiZipper < ExecutionResultNode > > unresolvedNodes ) { assertNotEmpty ( unresolvedNodes , "unresolvedNodes can't be empty" ) ; ExecutionResultNode commonRoot = unresolvedNodes . get ( 0 ) . getCommonRoot ( ) ; CompletableFuture < List < List < NodeZipper < ExecutionResultNode > > > > listListCF = Async . flatMap ( unresolvedNodes , executionResultMultiZipper -> fetchAndAnalyze ( executionContext , executionResultMultiZipper . getZippers ( ) ) ) ; return flatList ( listListCF ) . thenApply ( zippers -> new NodeMultiZipper < ExecutionResultNode > ( commonRoot , zippers , RESULT_NODE_ADAPTER ) ) ; }
all multizipper have the same root