@Test
public void testInit02() throws Exception {

    // 前処理(引数)
    String fileName = TEMP_FILE_NAME;
    Class<AbstractFileLineWriter_Stub01> clazz = AbstractFileLineWriter_Stub01.class;
    Map<String, ColumnFormatter> columnFormatterMap = new HashMap<String, ColumnFormatter>();
    columnFormatterMap.put("int", new IntColumnFormatter());
    columnFormatterMap.put("java.lang.String", new NullColumnFormatter());
    // 前処理(試験対象)
    AbstractFileLineWriter<AbstractFileLineWriter_Stub01> fileLineWriter = PowerMockito
            .spy(new AbstractFileLineWriterImpl01<AbstractFileLineWriter_Stub01>(fileName, clazz, columnFormatterMap));
    // 前処理(フィールド)
    ReflectionTestUtils.setField(fileLineWriter, "calledInit",
            Boolean.FALSE);
    ReflectionTestUtils.setField(fileLineWriter, "writer", null);
    BufferedReader postReader = null;
    try {
        // テスト実施
        fileLineWriter.init();
        // 判定(フィールド)
        assertNotNull(ReflectionTestUtils.getField(fileLineWriter,
                "writer"));
        PowerMockito.verifyPrivate(fileLineWriter).invoke("buildFields");
        PowerMockito.verifyPrivate(fileLineWriter).invoke(
                "buildStringConverters");
        PowerMockito.verifyPrivate(fileLineWriter).invoke("buildMethods");
        // 判定(ファイル)
        assertTrue(new File(fileName).exists());
        postReader = new BufferedReader(new InputStreamReader(new FileInputStream(fileName), "UTF-8"));
        assertFalse(postReader.ready());
    } finally {
        Writer writer = (Writer) ReflectionTestUtils.getField(
                fileLineWriter, "writer");
        if (writer != null) {
            writer.close();
        }
        if (postReader != null) {
            postReader.close();
        }
    }
}