@Test
public void testWarning() throws Exception {

    final List<String> warnings = new ArrayList<>();
    Logger log = new AbstractLogger(Logger.LEVEL_DEBUG, null) {
        @Override
        public void warn(String message, Throwable throwable) {
            warnings.add(message);
        }
        @Override
        public void info(String message, Throwable throwable) {
            fail();
        }
        @Override
        public Logger getChildLogger(String name) {
            return null;
        }
        @Override
        public void fatalError(String message, Throwable throwable) {
            fail();
        }
        @Override
        public void error(String message, Throwable throwable) {
            fail();
        }
        @Override
        public void debug(String message, Throwable throwable) {
            fail();
        }
    };
    IncludeValidationHelper subject = new IncludeValidationHelper(log);
    BuildPropertiesImpl buildProperties = createBuildProperties("src.includes", "foo3, bar3*,**/*.me");
    MavenProject project = createMockProject();
    subject.checkSourceIncludesExist(project, buildProperties, false);
    assertEquals(1, warnings.size());
    assertEquals(new File(project.getBasedir(), "build.properties").getAbsolutePath()
            + ": src.includes value(s) [foo3, bar3*] do not match any files.", warnings.get(0));
}