@Test
public void test() throws IOException {

    File originalFile = new File(transformedAppFolder, "foo.xml");
    File toDir = new File(transformedAppFolder, "/src/main/resources");
    assertTrue(originalFile.exists());
    assertTrue(originalFile.isFile());
    assertTrue(toDir.exists());
    // Saving original file as a temp file to have its content compared later
    File tempOriginalFile = File.createTempFile("butterfly-test-file", null);
    FileUtils.copyFile(originalFile, tempOriginalFile);
    Mockito.when(transformationContext.get("ATT")).thenReturn(new File(transformedAppFolder, "/src/main/resources"));
    MoveFile moveFile = new MoveFile().relative("foo.xml").setToAbsolute("ATT");
    TOExecutionResult executionResult = moveFile.execution(transformedAppFolder, transformationContext);
    assertEquals(executionResult.getType(), TOExecutionResult.Type.SUCCESS);
    assertEquals(moveFile.getToAbsoluteAttribute(), "ATT");
    assertEquals(moveFile.getDescription(), "Move file foo.xml to the location defined by transformation context attribute ATT");
    assertEquals(executionResult.getDetails(), "File 'foo.xml' has been moved to '/src/main/resources'");
    File copiedFile = new File(transformedAppFolder, "/src/main/resources/foo.xml");
    assertFalse(originalFile.exists());
    assertTrue(copiedFile.exists());
    assertTrue(FileUtils.contentEquals(tempOriginalFile, copiedFile));
    tempOriginalFile.delete();
}