private static String getMavenLanguageLevel(MavenProject project, boolean test, boolean source) {
    if (test) {
      return source ? project.getTestSourceLevel() : project.getTestTargetLevel();
    }
    else {
      return source ? project.getSourceLevel() : project.getTargetLevel();
    }
  }
private static String getMavenLanguageLevel(MavenProject project, boolean test, boolean source)