JFlexMojo extends AbstractMojo { private File getAbsolutePath(File path) { if (path == null || path.isAbsolute()) { return path; } return new File(this.project.getBasedir().getAbsolutePath(), path.getPath()); }  void execute();  }
@Test public void testTestResources() throws IOException { String actualResDir = testResources.getBasedir("single-file-test").getAbsolutePath(); String expectedSuffix = "/jflex-maven-plugin/target/test-projects/JFlexMojoTest_testTestResources_single-file-test"; assertWithMessage(actualResDir + " ends with " + expectedSuffix) .that(actualResDir.endsWith(expectedSuffix)) .isTrue(); }