@Test
public void testMergeFile04() throws Exception {

    // 引数の設定
    String classFileName = this.getClass().getSimpleName() + ".class";
    URL url = this.getClass().getResource(classFileName);
    String directoryPath = url.getPath().substring(0,
            url.getPath().length() - classFileName.length());
    List<String> fileList = new ArrayList<String>();
    String srcFile1 = directoryPath + "testMergeFile04_src1.txt";
    fileList.add(srcFile1);
    String newFile = directoryPath + "testMergeFile04_new.txt";
    // 前提条件の設定
    Field field = FileUtility.class.getDeclaredField("checkFileExist");
    field.setAccessible(true);
    field.set(FileUtility.class, true);        
    // テスト対象ファイルを初期化する。
    File testSrcFile1 = new File(srcFile1);
    testSrcFile1.delete();
    testSrcFile1.createNewFile();
    File testNewFile = new File(newFile);
    testNewFile.delete();
    FileWriter testSrcFile1FileWriter = null;
    FileWriter testNewFileFileWriter = null;
    try {
        testSrcFile1FileWriter = new FileWriter(testSrcFile1);
        testSrcFile1FileWriter.write("testMergeFile04_src1.txtデータ");
        testSrcFile1FileWriter.flush();
        testSrcFile1FileWriter.close();
        testNewFileFileWriter = new FileWriter(testNewFile);
        testNewFileFileWriter.write("testMergeFile04_new.txtデータ");
        testNewFileFileWriter.flush();
        testNewFileFileWriter.close();
        PowerMockito.mockStatic(FileUtility.class, Mockito.CALLS_REAL_METHODS);
        // テスト実施
        FileUtility.mergeFile(fileList, newFile);
        // 状態変化の確認
        PowerMockito.verifyPrivate(FileUtility.class, Mockito.times(2)).invoke("checkAbsolutePath", Mockito.anyString());
        PowerMockito.verifyPrivate(FileUtility.class).invoke("checkAbsolutePath", srcFile1);
        PowerMockito.verifyPrivate(FileUtility.class).invoke("checkAbsolutePath", newFile);
        // マージ先のファイル内容確認
        // コピー先のファイル内容確認
        File getFile = new File(newFile);
        FileContent testFileContent = new FileContent(testSrcFile1);
        FileContent fileContent = new FileContent(getFile);
        assertTrue(testFileContent.equals(fileContent));
    } finally {
        if (testSrcFile1FileWriter != null) {
            testSrcFile1FileWriter.close();
        }
        if (testNewFileFileWriter != null) {
            testNewFileFileWriter.close();
        }
        // テスト後ファイルを削除
        File file = new File(srcFile1);
        file.delete();
        file = new File(newFile);
        file.delete();
    }
}