@Test
public void testMergeFile08() throws Exception {

    // テスト対象のインスタンス化
    FileControlImpl fileControl = PowerMockito.spy(new FileControlImpl());
    // 引数の設定
    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 + "testMergeFile08-01_src.txt";
    fileList.add(srcFile1);
    String srcFile2 = null;
    fileList.add(srcFile2);
    String srcFile3 = directoryPath + "testMergeFile08-03_src.txt";
    fileList.add(srcFile3);
    String newFile = directoryPath + "testMergeFile08_new.txt";
    // テスト前、対象ファイルを初期化
    File file = new File(srcFile1);
    file.delete();
    file.createNewFile();
    file = new File(srcFile3);
    file.delete();
    file.createNewFile();
    file = new File(newFile);
    file.delete();
    file.createNewFile();
    // 前提条件の設定
    String basePath = "";
    ReflectionTestUtils.setField(fileControl, "basePath", basePath);
    Method getAbsolutePathMethod = PowerMockito.method(
            FileControlImpl.class, "getAbsolutePath", String.class);
    ArgumentCaptor<String> fileControlStringArgumentCaptor = ArgumentCaptor
            .forClass(String.class);
    PowerMockito.doCallRealMethod().when(fileControl, getAbsolutePathMethod)
            .withArguments(fileControlStringArgumentCaptor.capture());
    try {
        // テスト実施
        fileControl.mergeFile(fileList, newFile);
        fail("FileExceptionが発生しませんでした。失敗です。");
    } catch (FileException e) {
        // 返却値なし
        // 状態変化の確認
        PowerMockito.verifyPrivate(fileControl, Mockito.times(2)).invoke(
                getAbsolutePathMethod).withArguments(Mockito.anyString());
        List<String> argGetAbsolutePathList = fileControlStringArgumentCaptor
                .getAllValues();
        assertEquals(srcFile1, argGetAbsolutePathList.get(0));
        assertEquals(srcFile2, argGetAbsolutePathList.get(1));
        assertEquals(FileException.class, e.getClass());
        assertEquals("File name is not set.", e.getMessage());
        assertNull(e.getFileName());
    } finally {
        // テスト後、対象ファイルを初期化
        file = new File(srcFile1);
        file.delete();
        file = new File(srcFile3);
        file.delete();
        file = new File(newFile);
        file.delete();
    }
}