class CsvProcessor implements FileProcessor {

    @Override
    public <T> T exportBean(Class<T> clazz, String filePath) throws IOException {
        List<FieldDesc> list = processeCache.getFieldDescs(clazz);
        Assert.assertTrue(CollectionUtil.isNotEmpty(list), "FieldDesc is not empty");

        List<String> lines = ReaderUtil.readLinesAndClose(filePath, Charset.forName(GBK));
        List<String> titles = processeCache.getTitles(clazz);
        int size = lines.size();

        if (CollectionUtil.isEmpty(titles)) {
            // FIXME
            Assert.assertTrue(size == 1, "record size wrong");
        } else {
            Assert.assertTrue(size == 2, "record size wrong");
        }

        String[] strings = CsvUtil.toStringArray(lines.get(size - 1));
        Assert.assertTrue(list.size() == strings.length, "read record error");

        return stringsToBean(clazz, list, strings);
    }

}