### Question:
DefaultGraphBuilder implements GraphBuilder { @Override public Result<ProjectDependencyGraph> build( MavenSession session ) { try { Result<ProjectDependencyGraph> result = sessionDependencyGraph( session ); if ( result == null ) { final List<MavenProject> projects = getProjectsForMavenReactor( session ); validateProjects( projects ); enrichRequestFromResumptionData( projects, session.getRequest() ); result = reactorDependencyGraph( session, projects ); } return result; } catch ( final ProjectBuildingException | DuplicateProjectException | MavenExecutionException e ) { return Result.error( Collections.singletonList ( new DefaultModelProblem ( null, null, null, null, 0, 0, e ) ) ); } catch ( final CycleDetectedException e ) { String message = "The projects in the reactor contain a cyclic reference: " + e.getMessage(); ProjectCycleException error = new ProjectCycleException( message, e ); return Result.error( Collections.singletonList( new DefaultModelProblem( null, null, null, null, 0, 0, error ) ) ); } }  @Override Result<ProjectDependencyGraph> build( MavenSession session );  }### Answer:
@Test public void testGetReactorProjects() { List<String> selectedProjects = parameterSelectedProjects.stream().map( p -> ":" + p ).collect( Collectors.toList() ); List<String> excludedProjects = parameterExcludedProjects.stream().map( p -> ":" + p ).collect( Collectors.toList() ); when( mavenExecutionRequest.getSelectedProjects() ).thenReturn( selectedProjects ); when( mavenExecutionRequest.getExcludedProjects() ).thenReturn( excludedProjects ); when( mavenExecutionRequest.getMakeBehavior() ).thenReturn( parameterMakeBehavior ); if ( StringUtils.isNotEmpty( parameterResumeFrom ) ) { when( mavenExecutionRequest.getResumeFrom() ).thenReturn( ":" + parameterResumeFrom ); } Result<ProjectDependencyGraph> result = graphBuilder.build( session ); List<MavenProject> actualReactorProjects = result.get().getSortedProjects(); List<MavenProject> expectedReactorProjects = parameterExpectedResult.stream() .map( artifactIdProjectMap::get ) .collect( Collectors.toList()); assertEquals( parameterDescription, expectedReactorProjects, actualReactorProjects ); }