@Test
public void checkSourcesDirectoriesAreUpdated() throws Exception {

	// Find the project
	File baseDir = this.resources.getBasedir( "project--valid" );
	Assert.assertNotNull( baseDir );
	Assert.assertTrue( baseDir.exists());
	Assert.assertTrue( baseDir.isDirectory());
	File pom = new File( baseDir, "pom.xml" );
	InitializeMojo mojo = (InitializeMojo) this.rule.lookupMojo( "initialize", pom );
	Assert.assertNotNull( mojo );
	// Create the Maven project by hand (...)
	final MavenProject mvnProject = new MavenProject() ;
	mvnProject.setFile( pom ) ;
	this.rule.setVariableValueToObject( mojo, "project", mvnProject );
	Assert.assertNotNull( this.rule.getVariableValueFromObject( mojo, "project" ));
	// Execute the mojo
	List<Resource> list = mvnProject.getResources();
	Assert.assertEquals( 0, list.size());
	Assert.assertTrue( Utils.isEmptyOrWhitespaces( mvnProject.getBuild().getOutputDirectory()));
	mojo.execute();
	list = mvnProject.getResources();
	Assert.assertEquals( 2, list.size());
	Resource res = list.get( 0 );
	Assert.assertTrue( res.isFiltering());
	Assert.assertEquals( new File( baseDir, MavenPluginConstants.SOURCE_MODEL_DIRECTORY ).getAbsolutePath(), res.getDirectory());
	res = list.get( 1 );
	Assert.assertFalse( res.isFiltering());
	Assert.assertEquals( new File( baseDir, MavenPluginConstants.SOURCE_MODEL_DIRECTORY ).getAbsolutePath(), res.getDirectory());
	File expectedFile = new File( mvnProject.getBasedir(), MavenPluginConstants.TARGET_MODEL_DIRECTORY );
	Assert.assertEquals( expectedFile.getAbsolutePath(), mvnProject.getBuild().getOutputDirectory());
}