@Test
public void testPrintDataLine02() throws Exception {

    // テスト対象のインスタンス化
    String fileName = TEMP_FILE_NAME;
    Class<PlainFileLineWriter_Stub01> clazz = PlainFileLineWriter_Stub01.class;
    Map<String, ColumnFormatter> columnFormatterMap = new HashMap<String, ColumnFormatter>();
    columnFormatterMap.put("java.lang.String", new NullColumnFormatter());
    PlainFileLineWriter plainFileLineWriter = Mockito.spy(new PlainFileLineWriter(
            fileName, clazz, columnFormatterMap));
    // 引数の設定
    String t = "データ";
    // 前提条件の設定
    IOException exception = new IOException();
    Writer writer = PowerMockito.mock(Writer.class);
    Mockito.doThrow(exception).when(writer).write(Mockito.anyString());
    Mockito.doReturn(writer).when(plainFileLineWriter).getWriter();
    // テスト対象のインスタンス化時に設定済み
    // テスト実施
    try {
        plainFileLineWriter.printDataLine(t);
        fail("FileExceptionがスローされませんでした");
    } catch (FileException e) {
        // 返却値の確認
        // なし
        // 状態変化の確認
        Mockito.verify(plainFileLineWriter).checkWriteTrailer();
        Mockito.verify(plainFileLineWriter, Mockito.never()).getLineFeedChar();
        Mockito.verify(plainFileLineWriter).getWriter();
        Mockito.verify(plainFileLineWriter, Mockito.never()).setWriteData(Mockito.anyBoolean());
        assertSame(FileException.class, e.getClass());
        assertEquals("writer control operation was failed.", e.getMessage());
        assertSame(exception, e.getCause());
        assertEquals(fileName, e.getFileName());
    } finally {
        plainFileLineWriter.closeFile();
    }
}