{
final MockManager mm = new MockManager();
final MavenProject project = createProject( "group", "artifact", "version", null );
final MockAndControlForAddArtifactTask macTask = new MockAndControlForAddArtifactTask( mm, project );
final MavenProject module = createProject( "group", "module", "version", project );
final ArtifactMock moduleArtifactMock = new ArtifactMock( mm, "group", "module", "version", "jar", false );
final File moduleArtifactFile = moduleArtifactMock.setNewFile();
module.setArtifact( moduleArtifactMock.getArtifact() );
final List<MavenProject> projects = new ArrayList<MavenProject>();
projects.add( module );
macTask.expectGetReactorProjects( projects );
macTask.expectGetFinalName( "final-name" );
macTask.expectGetDestFile( new File( "junk" ) );
final int mode = TypeConversionUtils.modeToInt( "777", new ConsoleLogger( Logger.LEVEL_DEBUG, "test" ) );
macTask.expectAddFile( moduleArtifactFile, "out/artifact", mode );
final Assembly assembly = new Assembly();
assembly.setIncludeBaseDirectory( false );
final ModuleSet ms = new ModuleSet();