DefaultMavenEnvironment implements MavenEnvironment { @Override public Collection<String> excludes(final String checker) { final Collection<String> excludes = Collections2.transform( this.exc, new DefaultMavenEnvironment.CheckerExcludes(checker) ); return Collections2.filter(excludes, Predicates.notNull()); }  @Override String param(final String name, final String value); @Override File basedir(); @Override File tempdir(); @Override File outdir(); @Override @SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops") Collection<String> classpath(); @Override ClassLoader classloader(); @Override MavenProject project(); @Override Properties properties(); @Override Context context(); @Override Properties config(); @Override MojoExecutor executor(); @Override Collection<String> asserts(); @Override @SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops") Collection<File> files(final String pattern); @Override boolean exclude(final String check, final String name); @Override Collection<String> excludes(final String checker); void setProject(final MavenProject proj); void setContext(final Context ctx); void setMojoExecutor(final MojoExecutor exec); void setProperty(final String name, final String value); void setExcludes(final Collection<String> exprs); void setAsser(final Collection<String> ass);  }
@Test public final void noExclude() throws Exception { final DefaultMavenEnvironment env = new DefaultMavenEnvironment(); MatcherAssert.assertThat( env.excludes("codenarc").iterator().hasNext(), Matchers.is(false) ); }