PMDParameters { public String getVersion() { if (version != null) { return version; } return LanguageRegistry.findLanguageByTerseName(getLanguage()).getDefaultVersion().getVersion(); }  PMDConfiguration toConfiguration(); boolean isIgnoreIncrementalAnalysis(); @Deprecated static PMDConfiguration transformParametersIntoConfiguration(PMDParameters params); boolean isDebug(); boolean isHelp(); String getEncoding(); Integer getThreads(); boolean isBenchmark(); boolean isStress(); boolean isShortnames(); boolean isShowsuppressed(); String getSuppressmarker(); RulePriority getMinimumPriority(); Properties getProperties(); String getReportfile(); String getVersion(); String getLanguage(); String getAuxclasspath(); String getRulesets(); String getSourceDir(); String getFileListPath(); String getIgnoreListPath(); String getFormat(); boolean isFailOnViolation(); String getUri(); void setUri(String uri);  }
@Test public void testVersion() throws Exception { PMDParameters parameters = new PMDParameters(); Assert.assertEquals("1.7", parameters.getVersion()); FieldUtils.writeDeclaredField(parameters, "language", "dummy2", true); Assert.assertEquals("1.0", parameters.getVersion()); }