App { public static void main( String[] args ) throws IOException { new SimpleFileWriter("testfile.txt", new FileWriterAction() { @Override public void writeFile(FileWriter writer) throws IOException { writer.write("Hello"); writer.append(" "); writer.append("there!"); } }); }  static void main( String[] args );  }
@Test public void test() throws IOException { String[] args = {}; App.main(args); }