@@ -0,0 +1,2107 @@
+package com.iluwatar.execute.around;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.TemporaryFolder;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.nio.file.Files;%0A%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertNotNull;%0Aimport static org.junit.Assert.assertTrue;%0A%0A/**%0A * Date: 12/12/15 - 3:21 PM%0A *%0A * @author Jeroen Meulemeester%0A */%0Apublic class SimpleFileWriterTest %7B%0A%0A  /**%0A   * Create a temporary folder, used to generate files in during this test%0A   */%0A  @Rule%0A  public final TemporaryFolder testFolder = new TemporaryFolder();%0A%0A  /**%0A   * Verify if the given writer is not 'null'%0A   */%0A  @Test%0A  public void testWriterNotNull() throws Exception %7B%0A    final File temporaryFile = this.testFolder.newFile();%0A    new SimpleFileWriter(temporaryFile.getPath(), Assert::assertNotNull);%0A  %7D%0A%0A  /**%0A   * Test if the %7B@link SimpleFileWriter%7D creates a file if it doesn't exist%0A   */%0A  @Test%0A  public void testNonExistentFile() throws Exception %7B%0A    final File nonExistingFile = new File(this.testFolder.getRoot(), %22non-existing-file%22);%0A    assertFalse(nonExistingFile.exists());%0A%0A    new SimpleFileWriter(nonExistingFile.getPath(), Assert::assertNotNull);%0A    assertTrue(nonExistingFile.exists());%0A  %7D%0A%0A  /**%0A   * Test if the data written to the file writer actually gets in the file%0A   */%0A  @Test%0A  public void testActualWrite() throws Exception %7B%0A    final String testMessage = %22Test message%22;%0A%0A    final File temporaryFile = this.testFolder.newFile();%0A    assertTrue(temporaryFile.exists());%0A%0A    new SimpleFileWriter(temporaryFile.getPath(), writer -%3E writer.write(testMessage));%0A    assertTrue(Files.lines(temporaryFile.toPath()).allMatch(testMessage::equals));%0A  %7D%0A%0A  /**%0A   * Verify if an %7B@link IOException%7D during the write ripples through%0A   */%0A  @Test(expected = IOException.class)%0A  public void testIOException() throws Exception %7B%0A    final File temporaryFile = this.testFolder.newFile();%0A    new SimpleFileWriter(temporaryFile.getPath(), writer -%3E %7B%0A      throw new IOException(%22%22);%0A    %7D);%0A  %7D%0A%0A%7D%0A

Add proper tests for execute-around pattern