### Question:
DigiDoc4J { private static void showVersion() { System.out.println("DigiDoc4j version " + Version.VERSION); } private  DigiDoc4J(); static void main(String[] args); static boolean isWarning(String documentFormat, DigiDoc4JException exception);  }### Answer:
@Test public void showVersion() throws Exception { this.systemExit.expectSystemExitWithStatus(0); this.systemExit.checkAssertionAfterwards(new Assertion() { @Override public void checkAssertion() throws Exception { Assert.assertThat(stdOut.getLog(), StringContains.containsString("DigiDoc4j version")); } }); String[] parameters = {"--version"}; DigiDoc4J.main(parameters); }