DefaultFlexCompiler extends AbstractLogEnabled implements FlexCompiler { public Result compileSwc( final ICompcConfiguration configuration, boolean sychronize, final String compilerName ) throws Exception { return CommandUtil.execute( new Command() { public void command() throws Exception { String[] args = parser.parseArguments( configuration, ICompcConfiguration.class ); logArgs( args ); try { executeCompcMain(compilerName, args); } catch (Throwable t) { throw new Exception("Exception during Compc execution", t); } } }, sychronize ); }  Result compileSwc( final ICompcConfiguration configuration, boolean sychronize,
                              final String compilerName ); Result compileSwf( MxmlcConfigurationHolder cfgHolder, boolean sychronize,
                              final String compilerName ); Result asdoc( final IASDocConfiguration configuration, boolean sychronize,
                         final String compilerName ); Result digest( final IDigestConfiguration configuration, boolean sychronize,
                          final String compilerName ); Result optimize( final IOptimizerConfiguration configuration, boolean sychronize,
                            final String compilerName );  }
@Test public void compileDummySwc() throws Exception { File output = new File( as3, "result.swc" ); DefaultFlexCompiler compiler = (DefaultFlexCompiler) plexus.lookup( FlexCompiler.class ); ICompcConfiguration cfg = mock( ICompcConfiguration.class, RETURNS_NULL ); ICompilerConfiguration compilerCfg = getBaseCompilerCfg(); when( cfg.getIncludeSources() ).thenReturn( new File[] { as3 } ); when( cfg.getLoadConfig() ).thenReturn( new String[] {} ); when( cfg.getOutput() ).thenReturn( output.getAbsolutePath() ); when( cfg.getCompilerConfiguration() ).thenReturn( compilerCfg ); Assert.assertEquals( compiler.compileSwc( cfg, true, null ).getExitCode(), 0 ); }