Running unit tests with maven, that require runtime resources such as runtime CSS, runtime resource bundles, or other resources throws error because the resources have not been marked as trusted.

To be more detailed, maven has a file within the #Security folder of Flash Player, in which it stores a list with trusted swfs. For example, when maven runs the unit tests, it automatically adds the FlexUnit.swf to be trusted by Flash Player. This file, named maven.cfg is stored into ~/Library/Preferences/Macromedia/Flash\ Player/#Security/FlashPlayerTrust/ folder on a Mac. Other operating systems have a different path, as described in this link .

In my case, the problem was that I was writing some unit-tests that would load modules placed under /src/test/resources folder within my maven project.