@SuppressWarnings("unchecked")
@Test
public void testMergeFile09() 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 = "testMergeFile09-01_src.txt";
    fileList.add(srcFile1);
    String srcFile2 = "testMergeFile09-02_src.txt";
    fileList.add(srcFile2);
    String srcFile3 = "testMergeFile09-03_src.txt";
    fileList.add(srcFile3);
    String newFile = directoryPath + "testMergeFile09_new.txt";
    // テスト前、対象ファイルを初期化
    File file = new File(directoryPath + srcFile1);
    file.delete();
    file.createNewFile();
    file = new File(directoryPath + srcFile2);
    file.delete();
    file.createNewFile();
    file = new File(directoryPath + srcFile3);
    file.delete();
    file.createNewFile();
    file = new File(newFile);
    file.delete();
    file.createNewFile();
    // 前提条件の設定
    String basePath = directoryPath;
    ReflectionTestUtils.setField(fileControl, "basePath", basePath);
    PowerMockito.mockStatic(FileUtility.class);
    ArgumentCaptor<String> fileUtilityStringArgumentCaptor = ArgumentCaptor
            .forClass(String.class);
    @SuppressWarnings("rawtypes")
    ArgumentCaptor<List> fileUtilityListArgumentCaptor = ArgumentCaptor
            .forClass(List.class);
    PowerMockito.doNothing().when(FileUtility.class, "mergeFile",
            fileUtilityListArgumentCaptor.capture(),
            fileUtilityStringArgumentCaptor.capture());
    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);
        // 返却値なし
        // 状態変化の確認
        PowerMockito.verifyPrivate(fileControl, Mockito.times(4)).invoke(
                getAbsolutePathMethod).withArguments(Mockito.anyString());
        List<String> argGetAbsolutePathList = fileControlStringArgumentCaptor
                .getAllValues();
        assertEquals(fileList.get(0), argGetAbsolutePathList.get(0));
        assertEquals(fileList.get(1), argGetAbsolutePathList.get(1));
        assertEquals(fileList.get(2), argGetAbsolutePathList.get(2));
        assertEquals(newFile, argGetAbsolutePathList.get(3));
        PowerMockito.verifyStatic();
        FileUtility.mergeFile(Mockito.anyList(), Mockito.anyString());
        @SuppressWarnings("rawtypes")
        List argListMergeFile = fileUtilityListArgumentCaptor.getValue();
        assertEquals(basePath + srcFile1, argListMergeFile.get(0));
        assertEquals(basePath + srcFile2, argListMergeFile.get(1));
        assertEquals(basePath + srcFile3, argListMergeFile.get(2));
        String argStringMergeFile = fileUtilityStringArgumentCaptor
                .getValue();
        assertEquals(newFile, argStringMergeFile);
    } finally {
        // テスト後、対象ファイルを初期化
        file = new File(directoryPath + srcFile1);
        file.delete();
        file = new File(directoryPath + srcFile2);
        file.delete();
        file = new File(directoryPath + srcFile3);
        file.delete();
        file = new File(newFile);
        file.delete();
    }
}