### Question:
DefaultBuildResumptionDataRepository implements BuildResumptionDataRepository { void applyResumptionProperties( MavenExecutionRequest request, Properties properties ) { if ( properties.containsKey( RESUME_FROM_PROPERTY ) && StringUtils.isEmpty( request.getResumeFrom() ) ) { String propertyValue = properties.getProperty( RESUME_FROM_PROPERTY ); request.setResumeFrom( propertyValue ); LOGGER.info( "Resuming from {} due to the --resume / -r feature.", propertyValue ); } if ( properties.containsKey( EXCLUDED_PROJECTS_PROPERTY ) ) { String propertyValue = properties.getProperty( EXCLUDED_PROJECTS_PROPERTY ); if ( !StringUtils.isEmpty( propertyValue ) ) { String[] excludedProjects = propertyValue.split( PROPERTY_DELIMITER ); request.getExcludedProjects().addAll( Arrays.asList( excludedProjects ) ); LOGGER.info( "Additionally excluding projects '{}' due to the --resume / -r feature.", propertyValue ); } } }  @Override void persistResumptionData( MavenProject rootProject, BuildResumptionData buildResumptionData ); @Override void applyResumptionData( MavenExecutionRequest request, MavenProject rootProject ); @Override void removeResumptionData( MavenProject rootProject );  }### Answer:
@Test public void resumeFromPropertyGetsApplied() { MavenExecutionRequest request = new DefaultMavenExecutionRequest(); Properties properties = new Properties(); properties.setProperty( "resumeFrom", ":module-a" ); repository.applyResumptionProperties( request, properties ); assertThat( request.getResumeFrom(), is( ":module-a" ) ); }
@Test public void resumeFromPropertyDoesNotOverrideExistingRequestParameters() { MavenExecutionRequest request = new DefaultMavenExecutionRequest(); request.setResumeFrom( ":module-b" ); Properties properties = new Properties(); properties.setProperty( "resumeFrom", ":module-a" ); repository.applyResumptionProperties( request, properties ); assertThat( request.getResumeFrom(), is( ":module-b" ) ); }
@Test public void excludedProjectsFromPropertyGetsAddedToExistingRequestParameters() { MavenExecutionRequest request = new DefaultMavenExecutionRequest(); List<String> excludedProjects = new ArrayList<>(); excludedProjects.add( ":module-a" ); request.setExcludedProjects( excludedProjects ); Properties properties = new Properties(); properties.setProperty( "excludedProjects", ":module-b, :module-c" ); repository.applyResumptionProperties( request, properties ); assertThat( request.getExcludedProjects(), contains( ":module-a", ":module-b", ":module-c" ) ); }
@Test public void excludedProjectsAreNotAddedWhenPropertyValueIsEmpty() { MavenExecutionRequest request = new DefaultMavenExecutionRequest(); Properties properties = new Properties(); properties.setProperty( "excludedProjects", "" ); repository.applyResumptionProperties( request, properties ); assertThat( request.getExcludedProjects(), is( empty() ) ); }