ResourceMojoUtil { static boolean useDekorate(MavenProject project) { return new ProjectClassLoaders(MavenUtil.getCompileClassLoader(project)) .isClassInCompileClasspath(true, DEKORATE_CLASSES); } private  ResourceMojoUtil();   }
@Test public void useDekorateHasDekorateInClassPathShouldReturnTrue() throws Exception { withMockProject(); new Expectations() {{ projectClassLoaders.isClassInCompileClasspath(true, "io.dekorate.annotation.Dekorate"); result = true; }}; final boolean result = ResourceMojoUtil.useDekorate(mockProject); assertTrue(result); }
@Test public void useDekorateHasNotDekorateInClassPathShouldReturnFalse() throws Exception { withMockProject(); new Expectations() {{ projectClassLoaders.isClassInCompileClasspath(true, "io.dekorate.annotation.Dekorate"); result = false; }}; final boolean result = ResourceMojoUtil.useDekorate(mockProject); assertFalse(result); }