anchor.diff:  }
   ----
   
  +.Kotlin
  +[source,kotlin,role=secondary]
  +----
  +@Command
  +class MyApp : Runnable {
  +    @Spec lateinit var spec: CommandSpec
  +    
  +    override fun run() {
  +        // make testing easier by printing to the Err and Out streams provided by picocli
  +        spec.commandLine().out.println("Your output is abc...")
  +    }
  +}
  +----
  +
   === Testing the Output
  -Applications that print to `System.out` or `System.err` directly, or use a version of picocli older than 4.0, can be tested by capturing the standard output and error streams.
  +Applications that print to `System.out` or `System.err` directly, or use a version of picocli lower than 4.0, can be tested by capturing the standard output and error streams.
   There are various options for doing this, some of which are shown below.
   
   ==== Java 8+ with System-Lambda
  
positive.code: assertEquals("expectedValue2", app.getState2());
  ----
  
  This assumes that the application uses the `PrintWriter` provided by https://picocli.info/apidocs/picocli/CommandLine.html#getOut--[`CommandLine.getOut`] or  https://picocli.info/apidocs/picocli/CommandLine.html#getErr--[`CommandLine.getErr`].
  Applications can get these writers via the <<#spec-annotation,`@Spec`>> annotation:
  
  [source,java]
  ----
  @Command
  class MyApp implements Runnable {
  
negative.code: 
  For example:
  
  .Java
  [source,java, role=primary]
  ----
  MyApp app = new MyApp();
  CommandLine cmd = new CommandLine(app);
  