package net.w_horse.excelpojo.excel;

import static org.junit.Assert.*;

import java.io.FileInputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
import java.util.GregorianCalendar;

import net.w_horse.excelpojo.AbstractTest;
import net.w_horse.excelpojo.ExcelPOJOException;

import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.junit.Test;
import org.springframework.beans.TypeMismatchException;

public class ExcelUtilsTest extends AbstractTest {

	@Test
	public void testDataFormat() throws ExcelPOJOException, IOException {
		FileInputStream fileInputStream = null;
		try {
			fileInputStream = new FileInputStream("./files/upload/ParserTest.xls");
			HSSFWorkbook workBook = new HSSFWorkbook(new POIFSFileSystem(fileInputStream));
			HSSFSheet sheet = workBook.getSheet("各セルタイプ");

			assertEquals("各セルタイプ 01", new Integer(1), ExcelUtils.getCellValue(getCell(sheet, 1, 2), int.class));
			assertEquals("各セルタイプ 01→String", "1", ExcelUtils.getCellValue(getCell(sheet, 1, 2), String.class));
			assertEquals("各セルタイプ 01→double", 1.0, ExcelUtils.getCellValue(getCell(sheet, 1, 2), double.class), 0.1);
			assertEquals("各セルタイプ 01→BigDecimal", new BigDecimal("1"), ExcelUtils.getCellValue(getCell(sheet, 1, 2), BigDecimal.class));

			assertEquals("各セルタイプ 02", "文字列", ExcelUtils.getCellValue(getCell(sheet, 2, 2), String.class));

			assertEquals("各セルタイプ 03", new Integer(-1234), ExcelUtils.getCellValue(getCell(sheet, 3, 2), int.class));
			assertEquals("各セルタイプ 03→String", "(1,234)", ExcelUtils.getCellValue(getCell(sheet, 3, 2), String.class));
			assertEquals("各セルタイプ 03→double", -1234.0, ExcelUtils.getCellValue(getCell(sheet, 3, 2), double.class), 0.1);
			assertEquals("各セルタイプ 03→BigDecimal", new BigDecimal("-1234"), ExcelUtils.getCellValue(getCell(sheet, 3, 2), BigDecimal.class));

			assertEquals("各セルタイプ 04", new Integer(-1234), ExcelUtils.getCellValue(getCell(sheet, 4, 2), int.class));
			assertEquals("各セルタイプ 04→String", "(1,234)", ExcelUtils.getCellValue(getCell(sheet, 4, 2), String.class));
			assertEquals("各セルタイプ 04→double", -1234.0, ExcelUtils.getCellValue(getCell(sheet, 4, 2), double.class), 0.1);
			assertEquals("各セルタイプ 04→BigDecimal", new BigDecimal("-1234"), ExcelUtils.getCellValue(getCell(sheet, 4, 2), BigDecimal.class));

			assertEquals("各セルタイプ 05", new Integer(-1234), ExcelUtils.getCellValue(getCell(sheet, 5, 2), int.class));
			assertEquals("各セルタイプ 05→String", "-1,234", ExcelUtils.getCellValue(getCell(sheet, 5, 2), String.class));
			assertEquals("各セルタイプ 05→double", -1234.0, ExcelUtils.getCellValue(getCell(sheet, 5, 2), double.class), 0.1);
			assertEquals("各セルタイプ 05→BigDecimal", new BigDecimal("-1234"), ExcelUtils.getCellValue(getCell(sheet, 5, 2), BigDecimal.class));

			assertEquals("各セルタイプ 06", new Integer(-1234), ExcelUtils.getCellValue(getCell(sheet, 6, 2), int.class));
			assertEquals("各セルタイプ 06→String", "-1,234", ExcelUtils.getCellValue(getCell(sheet, 6, 2), String.class));
			assertEquals("各セルタイプ 06→double", -1234.0, ExcelUtils.getCellValue(getCell(sheet, 6, 2), double.class), 0.1);
			assertEquals("各セルタイプ 06→BigDecimal", new BigDecimal("-1234"), ExcelUtils.getCellValue(getCell(sheet, 6, 2), BigDecimal.class));

			assertEquals("各セルタイプ 07", new Integer(-1234), ExcelUtils.getCellValue(getCell(sheet, 7, 2), int.class));
			assertEquals("各セルタイプ 07→String", "-1,234", ExcelUtils.getCellValue(getCell(sheet, 7, 2), String.class));
			assertEquals("各セルタイプ 07→double", -1234.0, ExcelUtils.getCellValue(getCell(sheet, 7, 2), double.class), 0.1);
			assertEquals("各セルタイプ 07→BigDecimal", new BigDecimal("-1234"), ExcelUtils.getCellValue(getCell(sheet, 7, 2), BigDecimal.class));

			assertEquals("各セルタイプ 08", new Integer(-1234), ExcelUtils.getCellValue(getCell(sheet, 8, 2), int.class));
			assertEquals("各セルタイプ 08→String", "△ 1,234", ExcelUtils.getCellValue(getCell(sheet, 8, 2), String.class));
			assertEquals("各セルタイプ 08→double", -1234.0, ExcelUtils.getCellValue(getCell(sheet, 8, 2), double.class), 0.1);
			assertEquals("各セルタイプ 08→BigDecimal", new BigDecimal("-1234"), ExcelUtils.getCellValue(getCell(sheet, 8, 2), BigDecimal.class));

			assertEquals("各セルタイプ 09", new Integer(-1234), ExcelUtils.getCellValue(getCell(sheet, 9, 2), int.class));
			assertEquals("各セルタイプ 09→String", "▲ 1,234", ExcelUtils.getCellValue(getCell(sheet, 9, 2), String.class));
			assertEquals("各セルタイプ 09→double", -1234.0, ExcelUtils.getCellValue(getCell(sheet, 9, 2), double.class), 0.1);
			assertEquals("各セルタイプ 09→BigDecimal", new BigDecimal("-1234"), ExcelUtils.getCellValue(getCell(sheet, 9, 2), BigDecimal.class));

			assertEquals("各セルタイプ 10", -1234.56, ExcelUtils.getCellValue(getCell(sheet, 10, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 10→String", "(1234.56)", ExcelUtils.getCellValue(getCell(sheet, 10, 2), String.class));
			assertEquals("各セルタイプ 10→double", -1234.56, ExcelUtils.getCellValue(getCell(sheet, 10, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 10→BigDecimal", new BigDecimal("-1234.56"), ExcelUtils.getCellValue(getCell(sheet, 10, 2), BigDecimal.class));

			assertEquals("各セルタイプ 11", -1234.56, ExcelUtils.getCellValue(getCell(sheet, 11, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 11→String", "(1234.56)", ExcelUtils.getCellValue(getCell(sheet, 11, 2), String.class));
			assertEquals("各セルタイプ 11→double", -1234.56, ExcelUtils.getCellValue(getCell(sheet, 11, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 11→BigDecimal", new BigDecimal("-1234.56"), ExcelUtils.getCellValue(getCell(sheet, 11, 2), BigDecimal.class));

			assertEquals("各セルタイプ 12", -1234.56, ExcelUtils.getCellValue(getCell(sheet, 12, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 12→String", "-1234.56", ExcelUtils.getCellValue(getCell(sheet, 12, 2), String.class));
			assertEquals("各セルタイプ 12→double", -1234.56, ExcelUtils.getCellValue(getCell(sheet, 12, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 12→BigDecimal", new BigDecimal("-1234.56"), ExcelUtils.getCellValue(getCell(sheet, 12, 2), BigDecimal.class));

			assertEquals("各セルタイプ 13", -1234.56, ExcelUtils.getCellValue(getCell(sheet, 13, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 13→String", "-1234.56", ExcelUtils.getCellValue(getCell(sheet, 13, 2), String.class));
			assertEquals("各セルタイプ 13→double", -1234.56, ExcelUtils.getCellValue(getCell(sheet, 13, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 13→BigDecimal", new BigDecimal("-1234.56"), ExcelUtils.getCellValue(getCell(sheet, 13, 2), BigDecimal.class));

			assertEquals("各セルタイプ 14", -1234.56, ExcelUtils.getCellValue(getCell(sheet, 14, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 14→String", "-1234.56", ExcelUtils.getCellValue(getCell(sheet, 14, 2), String.class));
			assertEquals("各セルタイプ 14→double", -1234.56, ExcelUtils.getCellValue(getCell(sheet, 14, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 14→BigDecimal", new BigDecimal("-1234.56"), ExcelUtils.getCellValue(getCell(sheet, 14, 2), BigDecimal.class));

			assertEquals("各セルタイプ 15", -1234.56, ExcelUtils.getCellValue(getCell(sheet, 15, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 15→String", "△ 1234.56", ExcelUtils.getCellValue(getCell(sheet, 15, 2), String.class));
			assertEquals("各セルタイプ 15→double", -1234.56, ExcelUtils.getCellValue(getCell(sheet, 15, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 15→BigDecimal", new BigDecimal("-1234.56"), ExcelUtils.getCellValue(getCell(sheet, 15, 2), BigDecimal.class));

			assertEquals("各セルタイプ 16", -1234.56, ExcelUtils.getCellValue(getCell(sheet, 16, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 16→String", "▲ 1234.56", ExcelUtils.getCellValue(getCell(sheet, 16, 2), String.class));
			assertEquals("各セルタイプ 16→double", -1234.56, ExcelUtils.getCellValue(getCell(sheet, 16, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 16→BigDecimal", new BigDecimal("-1234.56"), ExcelUtils.getCellValue(getCell(sheet, 16, 2), BigDecimal.class));

			assertEquals("各セルタイプ 17", new Integer(-123456), ExcelUtils.getCellValue(getCell(sheet, 17, 2), int.class));
			assertEquals("各セルタイプ 17→String", "(123,456)", ExcelUtils.getCellValue(getCell(sheet, 17, 2), String.class));
			assertEquals("各セルタイプ 17→double", -123456.0, ExcelUtils.getCellValue(getCell(sheet, 17, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 17→BigDecimal", new BigDecimal("-123456"), ExcelUtils.getCellValue(getCell(sheet, 17, 2), BigDecimal.class));

			assertEquals("各セルタイプ 18", new Integer(-123456), ExcelUtils.getCellValue(getCell(sheet, 18, 2), int.class));
			assertEquals("各セルタイプ 18→String", "(123,456)", ExcelUtils.getCellValue(getCell(sheet, 18, 2), String.class));
			assertEquals("各セルタイプ 18→double", -123456.0, ExcelUtils.getCellValue(getCell(sheet, 18, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 18→BigDecimal", new BigDecimal("-123456"), ExcelUtils.getCellValue(getCell(sheet, 18, 2), BigDecimal.class));

			assertEquals("各セルタイプ 19", new Integer(-123456), ExcelUtils.getCellValue(getCell(sheet, 19, 2), int.class));
			assertEquals("各セルタイプ 19→String", "-123,456", ExcelUtils.getCellValue(getCell(sheet, 19, 2), String.class));
			assertEquals("各セルタイプ 19→double", -123456.0, ExcelUtils.getCellValue(getCell(sheet, 19, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 19→BigDecimal", new BigDecimal("-123456"), ExcelUtils.getCellValue(getCell(sheet, 19, 2), BigDecimal.class));

			assertEquals("各セルタイプ 20", new Integer(-123456), ExcelUtils.getCellValue(getCell(sheet, 20, 2), int.class));
			assertEquals("各セルタイプ 20→String", "($123,456)", ExcelUtils.getCellValue(getCell(sheet, 20, 2), String.class));
			assertEquals("各セルタイプ 20→double", -123456.0, ExcelUtils.getCellValue(getCell(sheet, 20, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 20→BigDecimal", new BigDecimal("-123456"), ExcelUtils.getCellValue(getCell(sheet, 20, 2), BigDecimal.class));

			assertEquals("各セルタイプ 21", new Integer(-123456), ExcelUtils.getCellValue(getCell(sheet, 21, 2), int.class));
			assertEquals("各セルタイプ 21→String", "($123,456)", ExcelUtils.getCellValue(getCell(sheet, 21, 2), String.class));
			assertEquals("各セルタイプ 21→double", -123456.0, ExcelUtils.getCellValue(getCell(sheet, 21, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 21→BigDecimal", new BigDecimal("-123456"), ExcelUtils.getCellValue(getCell(sheet, 21, 2), BigDecimal.class));

			assertEquals("各セルタイプ 22", -123456.78, ExcelUtils.getCellValue(getCell(sheet, 22, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 22→String", "(123,456.78)", ExcelUtils.getCellValue(getCell(sheet, 22, 2), String.class));
			assertEquals("各セルタイプ 22→double", -123456.78, ExcelUtils.getCellValue(getCell(sheet, 22, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 22→BigDecimal", new BigDecimal("-123456.78"), ExcelUtils.getCellValue(getCell(sheet, 22, 2), BigDecimal.class));

			assertEquals("各セルタイプ 23", -123456.78, ExcelUtils.getCellValue(getCell(sheet, 23, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 23→String", "(123,456.78)", ExcelUtils.getCellValue(getCell(sheet, 23, 2), String.class));
			assertEquals("各セルタイプ 23→double", -123456.78, ExcelUtils.getCellValue(getCell(sheet, 23, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 23→BigDecimal", new BigDecimal("-123456.78"), ExcelUtils.getCellValue(getCell(sheet, 23, 2), BigDecimal.class));

			assertEquals("各セルタイプ 24", -123456.78, ExcelUtils.getCellValue(getCell(sheet, 24, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 24→String", "-123,456.78", ExcelUtils.getCellValue(getCell(sheet, 24, 2), String.class));
			assertEquals("各セルタイプ 24→double", -123456.78, ExcelUtils.getCellValue(getCell(sheet, 24, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 24→BigDecimal", new BigDecimal("-123456.78"), ExcelUtils.getCellValue(getCell(sheet, 24, 2), BigDecimal.class));

			assertEquals("各セルタイプ 25", -123456.78, ExcelUtils.getCellValue(getCell(sheet, 25, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 25→String", "($123,456.78)", ExcelUtils.getCellValue(getCell(sheet, 25, 2), String.class));
			assertEquals("各セルタイプ 25→double", -123456.78, ExcelUtils.getCellValue(getCell(sheet, 25, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 25→BigDecimal", new BigDecimal("-123456.78"), ExcelUtils.getCellValue(getCell(sheet, 25, 2), BigDecimal.class));

			assertEquals("各セルタイプ 26", -123456.78, ExcelUtils.getCellValue(getCell(sheet, 26, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 26→String", "($123,456.78)", ExcelUtils.getCellValue(getCell(sheet, 26, 2), String.class));
			assertEquals("各セルタイプ 26→double", -123456.78, ExcelUtils.getCellValue(getCell(sheet, 26, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 26→BigDecimal", new BigDecimal("-123456.78"), ExcelUtils.getCellValue(getCell(sheet, 26, 2), BigDecimal.class));

			assertEquals("各セルタイプ 27", new Integer(-123456), ExcelUtils.getCellValue(getCell(sheet, 27, 2), int.class));
			assertEquals("各セルタイプ 27→String", "-123456", ExcelUtils.getCellValue(getCell(sheet, 27, 2), String.class));
			assertEquals("各セルタイプ 27→double", -123456.00, ExcelUtils.getCellValue(getCell(sheet, 27, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 27→BigDecimal", new BigDecimal("-123456"), ExcelUtils.getCellValue(getCell(sheet, 27, 2), BigDecimal.class));

			assertEquals("各セルタイプ 28", new Integer(-123456), ExcelUtils.getCellValue(getCell(sheet, 28, 2), int.class));
			assertEquals("各セルタイプ 28→String", "-123456", ExcelUtils.getCellValue(getCell(sheet, 28, 2), String.class));
			assertEquals("各セルタイプ 28→double", -123456.00, ExcelUtils.getCellValue(getCell(sheet, 28, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 28→BigDecimal", new BigDecimal("-123456"), ExcelUtils.getCellValue(getCell(sheet, 28, 2), BigDecimal.class));

			assertEquals("各セルタイプ 29", -123456.78, ExcelUtils.getCellValue(getCell(sheet, 29, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 29→String", "-123456.78", ExcelUtils.getCellValue(getCell(sheet, 29, 2), String.class));
			assertEquals("各セルタイプ 29→double", -123456.78, ExcelUtils.getCellValue(getCell(sheet, 29, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 29→BigDecimal", new BigDecimal("-123456.78"), ExcelUtils.getCellValue(getCell(sheet, 29, 2), BigDecimal.class));

			assertEquals("各セルタイプ 30", -123456.78, ExcelUtils.getCellValue(getCell(sheet, 30, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 30→String", "-123456.78", ExcelUtils.getCellValue(getCell(sheet, 30, 2), String.class));
			assertEquals("各セルタイプ 30→double", -123456.78, ExcelUtils.getCellValue(getCell(sheet, 30, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 30→BigDecimal", new BigDecimal("-123456.78"), ExcelUtils.getCellValue(getCell(sheet, 30, 2), BigDecimal.class));

			assertEquals("各セルタイプ 31", 0.1234, ExcelUtils.getCellValue(getCell(sheet, 31, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 31→String", "12%", ExcelUtils.getCellValue(getCell(sheet, 31, 2), String.class));
			assertEquals("各セルタイプ 31→double", 0.1234, ExcelUtils.getCellValue(getCell(sheet, 31, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 31→BigDecimal", new BigDecimal("0.1234"), ExcelUtils.getCellValue(getCell(sheet, 31, 2), BigDecimal.class));

			assertEquals("各セルタイプ 32", 0.1234, ExcelUtils.getCellValue(getCell(sheet, 32, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 32→String", "12.34%", ExcelUtils.getCellValue(getCell(sheet, 32, 2), String.class));
			assertEquals("各セルタイプ 32→double", 0.1234, ExcelUtils.getCellValue(getCell(sheet, 32, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 32→BigDecimal", new BigDecimal("0.1234"), ExcelUtils.getCellValue(getCell(sheet, 32, 2), BigDecimal.class));

			assertEquals("各セルタイプ 33", new Integer(2), ExcelUtils.getCellValue(getCell(sheet, 33, 2), int.class));
			assertEquals("各セルタイプ 33→String", "2", ExcelUtils.getCellValue(getCell(sheet, 33, 2), String.class));
			assertEquals("各セルタイプ 33→double", 2, ExcelUtils.getCellValue(getCell(sheet, 33, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 33→BigDecimal", new BigDecimal("2"), ExcelUtils.getCellValue(getCell(sheet, 33, 2), BigDecimal.class));

			assertEquals("各セルタイプ 34","文字列_付加文字列", ExcelUtils.getCellValue(getCell(sheet, 34, 2), String.class));

			assertEquals("各セルタイプ 35", new Integer(-1234), ExcelUtils.getCellValue(getCell(sheet, 35, 2), int.class));
			assertEquals("各セルタイプ 35→String", "(1,234)", ExcelUtils.getCellValue(getCell(sheet, 35, 2), String.class));
			assertEquals("各セルタイプ 35→double", -1234.0, ExcelUtils.getCellValue(getCell(sheet, 35, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 35→BigDecimal", new BigDecimal("-1234"), ExcelUtils.getCellValue(getCell(sheet, 35, 2), BigDecimal.class));

			assertEquals("各セルタイプ 36",(new GregorianCalendar(2010, 6 -1, 23)).getTime(), ExcelUtils.getCellValue(getCell(sheet, 36, 2), Date.class));
			assertEquals("各セルタイプ 36","2010年6月23日", ExcelUtils.getCellValue(getCell(sheet, 36, 2), String.class));

			assertEquals("各セルタイプ 37",new BigInteger("-12345678901234500000"), ExcelUtils.getCellValue(getCell(sheet, 37, 2), BigInteger.class));
			assertEquals("各セルタイプ 37→String", "△ 12,345,678,901,234,500,000", ExcelUtils.getCellValue(getCell(sheet, 37, 2), String.class));

			assertEquals("各セルタイプ 38",-1.23456789012345E12, ExcelUtils.getCellValue(getCell(sheet, 38, 2), double.class), 0.000000000000001);
			assertEquals("各セルタイプ 38→String", "△ 1,234,567,890,123.45", ExcelUtils.getCellValue(getCell(sheet, 38, 2), String.class));

		} finally {
			try { fileInputStream.close(); } catch (Exception e) { }
		}
	}

	@Test
	public void testNumeric() throws ExcelPOJOException, IOException {
		FileInputStream fileInputStream = null;
		try {
			fileInputStream = new FileInputStream("./files/upload/ParserTest.xls");
			HSSFWorkbook workBook = new HSSFWorkbook(new POIFSFileSystem(fileInputStream));
			HSSFSheet sheet = workBook.getSheet("数値（境界）");

			assertEquals("数値（境界） Integer.MIN_VALUE", new Integer(2147483647), ExcelUtils.getCellValue(getCell(sheet, 1, 2), int.class));
			assertEquals("数値（境界） Integer.MAXV_ALUE", new Integer(-2147483648) , ExcelUtils.getCellValue(getCell(sheet, 2, 2), int.class));
			assertEquals("数値（境界） Integer.MIN_VALUE +1", new BigInteger("2147483648"), ExcelUtils.getCellValue(getCell(sheet, 3, 2), BigInteger.class));
			assertEquals("数値（境界） Integer.MAXV_ALUE -1", new BigInteger("-2147483649"), ExcelUtils.getCellValue(getCell(sheet, 4, 2), BigInteger.class));
			assertEquals("数値（境界） Integer.MIN_VALUE", new BigInteger("2147483647"), ExcelUtils.getCellValue(getCell(sheet, 1, 2), BigInteger.class));
			assertEquals("数値（境界） Integer.MAXV_ALUE", new BigInteger("-2147483648") , ExcelUtils.getCellValue(getCell(sheet, 2, 2), BigInteger.class));
			assertEquals("数値（境界） 少数あり", 123.45, ExcelUtils.getCellValue(getCell(sheet, 5, 2), double.class), 0.000000000000001);
			assertEquals("数値（境界） double 桁", 1.23456789012345, ExcelUtils.getCellValue(getCell(sheet, 6, 2), double.class), 0.000000000000001);
			assertEquals("数値（境界） double 最小", 2.2250738585072014E-308, ExcelUtils.getCellValue(getCell(sheet, 7, 2), double.class), 1E-308);
			assertEquals("数値（境界） double 最大", new BigInteger("179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), ExcelUtils.getCellValue(getCell(sheet, 8, 2), BigInteger.class));
			assertEquals("数値（境界） 少数あり（小数部0）", (double)123.00, ExcelUtils.getCellValue(getCell(sheet, 9, 2), double.class), 0.01);

		} finally {
			try { fileInputStream.close(); } catch (Exception e) { }
		}
	}

	@Test
	public void testDataFormat_NoSpecifiedClass() throws ExcelPOJOException, IOException {
		FileInputStream fileInputStream = null;
		try {
			fileInputStream = new FileInputStream("./files/upload/ParserTest.xls");
			HSSFWorkbook workBook = new HSSFWorkbook(new POIFSFileSystem(fileInputStream));
			HSSFSheet sheet = workBook.getSheet("各セルタイプ");

			assertEquals("各セルタイプ 01", new Integer(1), ExcelUtils.getCellValue(getCell(sheet, 1, 2)));
			assertEquals("各セルタイプ 02", "文字列", ExcelUtils.getCellValue(getCell(sheet, 2, 2)));
			assertEquals("各セルタイプ 03", new Integer(-1234), ExcelUtils.getCellValue(getCell(sheet, 3, 2)));
			assertEquals("各セルタイプ 04", new Integer(-1234), ExcelUtils.getCellValue(getCell(sheet, 4, 2)));
			assertEquals("各セルタイプ 05", new Integer(-1234), ExcelUtils.getCellValue(getCell(sheet, 5, 2)));
			assertEquals("各セルタイプ 06", new Integer(-1234), ExcelUtils.getCellValue(getCell(sheet, 6, 2)));
			assertEquals("各セルタイプ 07", new Integer(-1234), ExcelUtils.getCellValue(getCell(sheet, 7, 2)));
			assertEquals("各セルタイプ 08", new Integer(-1234), ExcelUtils.getCellValue(getCell(sheet, 8, 2)));
			assertEquals("各セルタイプ 09", new Integer(-1234), ExcelUtils.getCellValue(getCell(sheet, 9, 2)));
			assertEquals("各セルタイプ 10", -1234.56, (Double)ExcelUtils.getCellValue(getCell(sheet, 10, 2)), 0.000000000000001);
			assertEquals("各セルタイプ 11", -1234.56, (Double)ExcelUtils.getCellValue(getCell(sheet, 11, 2)), 0.000000000000001);
			assertEquals("各セルタイプ 12", -1234.56, (Double)ExcelUtils.getCellValue(getCell(sheet, 12, 2)), 0.000000000000001);
			assertEquals("各セルタイプ 13", -1234.56, (Double)ExcelUtils.getCellValue(getCell(sheet, 13, 2)), 0.000000000000001);
			assertEquals("各セルタイプ 14", -1234.56, (Double)ExcelUtils.getCellValue(getCell(sheet, 14, 2)), 0.000000000000001);
			assertEquals("各セルタイプ 15", -1234.56, (Double)ExcelUtils.getCellValue(getCell(sheet, 15, 2)), 0.000000000000001);
			assertEquals("各セルタイプ 16", -1234.56, (Double)ExcelUtils.getCellValue(getCell(sheet, 16, 2)), 0.000000000000001);
			assertEquals("各セルタイプ 17", new Integer(-123456), ExcelUtils.getCellValue(getCell(sheet, 17, 2)));
			assertEquals("各セルタイプ 18", new Integer(-123456), ExcelUtils.getCellValue(getCell(sheet, 18, 2)));
			assertEquals("各セルタイプ 19", new Integer(-123456), ExcelUtils.getCellValue(getCell(sheet, 19, 2)));
			assertEquals("各セルタイプ 20", new Integer(-123456), ExcelUtils.getCellValue(getCell(sheet, 20, 2)));
			assertEquals("各セルタイプ 21", new Integer(-123456), ExcelUtils.getCellValue(getCell(sheet, 21, 2)));
			assertEquals("各セルタイプ 22", -123456.78, (Double)ExcelUtils.getCellValue(getCell(sheet, 22, 2)), 0.000000000000001);
			assertEquals("各セルタイプ 23", -123456.78, (Double)ExcelUtils.getCellValue(getCell(sheet, 23, 2)), 0.000000000000001);
			assertEquals("各セルタイプ 24", -123456.78, (Double)ExcelUtils.getCellValue(getCell(sheet, 24, 2)), 0.000000000000001);
			assertEquals("各セルタイプ 25", -123456.78, (Double)ExcelUtils.getCellValue(getCell(sheet, 25, 2)), 0.000000000000001);
			assertEquals("各セルタイプ 26", -123456.78, (Double)ExcelUtils.getCellValue(getCell(sheet, 26, 2)), 0.000000000000001);
			assertEquals("各セルタイプ 27", new Integer(-123456), ExcelUtils.getCellValue(getCell(sheet, 27, 2)));
			assertEquals("各セルタイプ 28", new Integer(-123456), ExcelUtils.getCellValue(getCell(sheet, 28, 2)));
			assertEquals("各セルタイプ 29", -123456.78, (Double)ExcelUtils.getCellValue(getCell(sheet, 29, 2)), 0.000000000000001);
			assertEquals("各セルタイプ 30", -123456.78, (Double)ExcelUtils.getCellValue(getCell(sheet, 30, 2)), 0.000000000000001);
			assertEquals("各セルタイプ 31", 0.1234, (Double)ExcelUtils.getCellValue(getCell(sheet, 31, 2)), 0.000000000000001);
			assertEquals("各セルタイプ 32", 0.1234, (Double)ExcelUtils.getCellValue(getCell(sheet, 32, 2)), 0.000000000000001);
			assertEquals("各セルタイプ 33", new Integer(2), ExcelUtils.getCellValue(getCell(sheet, 33, 2)));
			assertEquals("各セルタイプ 34","文字列_付加文字列", ExcelUtils.getCellValue(getCell(sheet, 34, 2)));
			assertEquals("各セルタイプ 35", new Integer(-1234), ExcelUtils.getCellValue(getCell(sheet, 35, 2)));
			assertEquals("各セルタイプ 36",(new GregorianCalendar(2010, 6 -1, 23)).getTime(), ExcelUtils.getCellValue(getCell(sheet, 36, 2)));
			assertEquals("各セルタイプ 37",new BigInteger("-12345678901234500000"), ExcelUtils.getCellValue(getCell(sheet, 37, 2)));
			assertEquals("各セルタイプ 38",-1.23456789012345E12, (Double)ExcelUtils.getCellValue(getCell(sheet, 38, 2)), 0.000000000000001);

		} finally {
			try { fileInputStream.close(); } catch (Exception e) { }
		}
	}

	@Test
	public void testNumeric_NoSpecifiedClass() throws ExcelPOJOException, IOException {
		FileInputStream fileInputStream = null;
		try {
			fileInputStream = new FileInputStream("./files/upload/ParserTest.xls");
			HSSFWorkbook workBook = new HSSFWorkbook(new POIFSFileSystem(fileInputStream));
			HSSFSheet sheet = workBook.getSheet("数値（境界）");

			assertEquals("数値（境界） Integer.MIN_VALUE", 2147483647, ExcelUtils.getCellValue(getCell(sheet, 1, 2)));
			assertEquals("数値（境界） Integer.MAXV_ALUE", -2147483648 , ExcelUtils.getCellValue(getCell(sheet, 2, 2)));
			assertEquals("数値（境界） Integer.MIN_VALUE +1", new BigInteger("2147483648"), ExcelUtils.getCellValue(getCell(sheet, 3, 2)));
			assertEquals("数値（境界） Integer.MAXV_ALUE -1", new BigInteger("-2147483649"), ExcelUtils.getCellValue(getCell(sheet, 4, 2)));
			assertEquals("数値（境界） 少数あり", 123.45, (Double)ExcelUtils.getCellValue(getCell(sheet, 5, 2)), 0.000000000000001);
			assertEquals("数値（境界） double 桁", 1.23456789012345, (Double)ExcelUtils.getCellValue(getCell(sheet, 6, 2)), 0.000000000000001);
			assertEquals("数値（境界） double 最小", 2.2250738585072014E-308, (Double)ExcelUtils.getCellValue(getCell(sheet, 7, 2)), 1E-308);
			assertEquals("数値（境界） double 最大", new BigInteger("179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), ExcelUtils.getCellValue(getCell(sheet, 8, 2)));
			assertEquals("数値（境界） 少数あり（小数部0）", 123, ExcelUtils.getCellValue(getCell(sheet, 9, 2)));

		} finally {
			try { fileInputStream.close(); } catch (Exception e) { }
		}
	}

	@Test
	public void testDateFormat() throws ExcelPOJOException, IOException {
		FileInputStream fileInputStream = null;
		try {
			fileInputStream = new FileInputStream("./files/upload/ParserTest.xls");
			HSSFWorkbook workBook = new HSSFWorkbook(new POIFSFileSystem(fileInputStream));
			HSSFSheet sheet = workBook.getSheet("日付フォーマット");

			assertEquals("日付フォーマット 01", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 1, 2), Date.class));
			assertEquals("日付フォーマット 02", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 2, 2), Date.class));
			assertEquals("日付フォーマット 03", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 3, 2), Date.class));
			assertEquals("日付フォーマット 04", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 4, 2), Date.class));
			assertEquals("日付フォーマット 05", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 5, 2), Date.class));
			assertEquals("日付フォーマット 06", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 6, 2), Date.class));
			assertEquals("日付フォーマット 07", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 7, 2), Date.class));
			assertEquals("日付フォーマット 08", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 8, 2), Date.class));
			assertEquals("日付フォーマット 09", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 9, 2), Date.class));
			assertEquals("日付フォーマット 10", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 10, 2), Date.class));
			assertEquals("日付フォーマット 11", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 11, 2), Date.class));
			assertEquals("日付フォーマット 12", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 12, 2), Date.class));
			assertEquals("日付フォーマット 13", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 13, 2), Date.class));
			assertEquals("日付フォーマット 14", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 14, 2), Date.class));
			assertEquals("日付フォーマット 15", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 15, 2), Date.class));
			assertEquals("日付フォーマット 16", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 16, 2), Date.class));
			assertEquals("日付フォーマット 17", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 17, 2), Date.class));
			assertEquals("日付フォーマット 18", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 18, 2), Date.class));
			assertEquals("日付フォーマット 19", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 19, 2), Date.class));
			assertEquals("日付フォーマット 20", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 20, 2), Date.class));
			assertEquals("日付フォーマット 21", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 21, 2), Date.class));
//			assertEquals("日付フォーマット 22", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 22, 2), Date.class));
//			assertEquals("日付フォーマット 23", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 23, 2), Date.class));
//			assertEquals("日付フォーマット 24", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 24, 2), Date.class));
//			assertEquals("日付フォーマット 25", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 25, 2), Date.class));
//			assertEquals("日付フォーマット 26", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 26, 2), Date.class));
			assertEquals("日付フォーマット 27", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 27, 2), Date.class));
			assertEquals("日付フォーマット 28", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 28, 2), Date.class));
			assertEquals("日付フォーマット 29", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 29, 2), Date.class));
			assertEquals("日付フォーマット 30", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 30, 2), Date.class));
			assertEquals("日付フォーマット 31", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 31, 2), Date.class));
			assertEquals("日付フォーマット 32", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 32, 2), Date.class));
			assertEquals("日付フォーマット 33", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 33, 2), Date.class));
			assertEquals("日付フォーマット 34", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 34, 2), Date.class));
			assertEquals("日付フォーマット 35", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 35, 2), Date.class));
			assertEquals("日付フォーマット 36", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 36, 2), Date.class));
			assertEquals("日付フォーマット 37", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 37, 2), Date.class));
//			assertEquals("日付フォーマット 38", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 38, 2), Date.class));
			assertEquals("日付フォーマット 39", (new GregorianCalendar(2010, 1 -1, 2, 9, 3, 4)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 39, 2), Date.class));
			assertEquals("日付フォーマット 40", (new GregorianCalendar(2010, 6 -1, 18)).getTime(),ExcelUtils.getCellValue(getCell(sheet, 40, 2), Date.class));

		} finally {
			try { fileInputStream.close(); } catch (Exception e) { }
		}

	}

	@Test(expected=TypeMismatchException.class)
	public void testDateFormatException22() throws IOException, ExcelPOJOException {
		FileInputStream fileInputStream = null;
		try {
			fileInputStream = new FileInputStream("./files/upload/ParserTest.xls");
			HSSFWorkbook workBook = new HSSFWorkbook(new POIFSFileSystem(fileInputStream));
			HSSFSheet sheet = workBook.getSheet("日付フォーマット");

			ExcelUtils.getCellValue(getCell(sheet, 22, 2), Date.class);
		} finally {
			try { fileInputStream.close(); } catch (Exception e) { }
		}

	}
	@Test(expected=TypeMismatchException.class)
	public void testDateFormatException23() throws IOException, ExcelPOJOException {
		FileInputStream fileInputStream = null;
		try {
			fileInputStream = new FileInputStream("./files/upload/ParserTest.xls");
			HSSFWorkbook workBook = new HSSFWorkbook(new POIFSFileSystem(fileInputStream));
			HSSFSheet sheet = workBook.getSheet("日付フォーマット");

			ExcelUtils.getCellValue(getCell(sheet, 23, 2), Date.class);
		} finally {
			try { fileInputStream.close(); } catch (Exception e) { }
		}

	}
	@Test(expected=TypeMismatchException.class)
	public void testDateFormatException24() throws IOException, ExcelPOJOException {
		FileInputStream fileInputStream = null;
		try {
			fileInputStream = new FileInputStream("./files/upload/ParserTest.xls");
			HSSFWorkbook workBook = new HSSFWorkbook(new POIFSFileSystem(fileInputStream));
			HSSFSheet sheet = workBook.getSheet("日付フォーマット");

			ExcelUtils.getCellValue(getCell(sheet, 24, 2), Date.class);
		} finally {
			try { fileInputStream.close(); } catch (Exception e) { }
		}

	}

	@Test(expected=TypeMismatchException.class)
	public void testDateFormatException25() throws IOException, ExcelPOJOException {
		FileInputStream fileInputStream = null;
		try {
			fileInputStream = new FileInputStream("./files/upload/ParserTest.xls");
			HSSFWorkbook workBook = new HSSFWorkbook(new POIFSFileSystem(fileInputStream));
			HSSFSheet sheet = workBook.getSheet("日付フォーマット");

			ExcelUtils.getCellValue(getCell(sheet, 25, 2), Date.class);
		} finally {
			try { fileInputStream.close(); } catch (Exception e) { }
		}

	}
	@Test(expected=TypeMismatchException.class)
	public void testDateFormatException26() throws IOException, ExcelPOJOException {
		FileInputStream fileInputStream = null;
		try {
			fileInputStream = new FileInputStream("./files/upload/ParserTest.xls");
			HSSFWorkbook workBook = new HSSFWorkbook(new POIFSFileSystem(fileInputStream));
			HSSFSheet sheet = workBook.getSheet("日付フォーマット");

			ExcelUtils.getCellValue(getCell(sheet, 26, 2), Date.class);
		} finally {
			try { fileInputStream.close(); } catch (Exception e) { }
		}

	}

	@Test(expected=TypeMismatchException.class)
	public void testDateFormatException38() throws IOException, ExcelPOJOException {
		FileInputStream fileInputStream = null;
		try {
			fileInputStream = new FileInputStream("./files/upload/ParserTest.xls");
			HSSFWorkbook workBook = new HSSFWorkbook(new POIFSFileSystem(fileInputStream));
			HSSFSheet sheet = workBook.getSheet("日付フォーマット");

			ExcelUtils.getCellValue(getCell(sheet, 38, 2), Date.class);
		} finally {
			try { fileInputStream.close(); } catch (Exception e) { }
		}

	}

	@Test
	public void testDateFormatConvertString() throws ExcelPOJOException, IOException {
		FileInputStream fileInputStream = null;
		try {
			fileInputStream = new FileInputStream("./files/upload/ParserTest.xls");
			HSSFWorkbook workBook = new HSSFWorkbook(new POIFSFileSystem(fileInputStream));
			HSSFSheet sheet = workBook.getSheet("日付フォーマット");

			assertEquals("日付フォーマット 01", "2010/1/2",ExcelUtils.getCellValue(getCell(sheet, 1, 2), String.class));
			assertEquals("日付フォーマット 02", "2-Jan-10",ExcelUtils.getCellValue(getCell(sheet, 2, 2), String.class));
			assertEquals("日付フォーマット 03", "2-Jan",ExcelUtils.getCellValue(getCell(sheet, 3, 2), String.class));
			assertEquals("日付フォーマット 04", "Jan-10",ExcelUtils.getCellValue(getCell(sheet, 4, 2), String.class));
			assertEquals("日付フォーマット 05", "9:03 AM",ExcelUtils.getCellValue(getCell(sheet, 5, 2), String.class));
			assertEquals("日付フォーマット 06", "9:03:04 AM",ExcelUtils.getCellValue(getCell(sheet, 6, 2), String.class));
			assertEquals("日付フォーマット 07", "9:03",ExcelUtils.getCellValue(getCell(sheet, 7, 2), String.class));
			assertEquals("日付フォーマット 08", "9:03:04",ExcelUtils.getCellValue(getCell(sheet, 8, 2), String.class));
			assertEquals("日付フォーマット 09", "2010/1/2 9:03",ExcelUtils.getCellValue(getCell(sheet, 9, 2), String.class));
			assertEquals("日付フォーマット 10", "1/2/10",ExcelUtils.getCellValue(getCell(sheet, 10, 2), String.class));
			assertEquals("日付フォーマット 11", "2010年1月2日",ExcelUtils.getCellValue(getCell(sheet, 11, 2), String.class));
			assertEquals("日付フォーマット 12", "9時03分",ExcelUtils.getCellValue(getCell(sheet, 12, 2), String.class));
			assertEquals("日付フォーマット 13", "9時03分04秒",ExcelUtils.getCellValue(getCell(sheet, 13, 2), String.class));
			assertEquals("日付フォーマット 14", "03:04",ExcelUtils.getCellValue(getCell(sheet, 14, 2), String.class));
			assertEquals("日付フォーマット 15", "03:04.0",ExcelUtils.getCellValue(getCell(sheet, 15, 2), String.class));
			assertEquals("日付フォーマット 16", "2010年1月",ExcelUtils.getCellValue(getCell(sheet, 16, 2), String.class));
			assertEquals("日付フォーマット 17", "1月2日",ExcelUtils.getCellValue(getCell(sheet, 17, 2), String.class));
			assertEquals("日付フォーマット 18", "H22.1.2",ExcelUtils.getCellValue(getCell(sheet, 18, 2), String.class));
			assertEquals("日付フォーマット 19", "平成22年1月2日",ExcelUtils.getCellValue(getCell(sheet, 19, 2), String.class));
			assertEquals("日付フォーマット 20", "2010/01/02",ExcelUtils.getCellValue(getCell(sheet, 20, 2), String.class));
			assertEquals("日付フォーマット 21", "2010/01/02",ExcelUtils.getCellValue(getCell(sheet, 21, 2), String.class));

			assertEquals("日付フォーマット 22", "40180.37712962963",ExcelUtils.getCellValue(getCell(sheet, 22, 2), String.class));
			assertEquals("日付フォーマット 23", "40180.37712962963",ExcelUtils.getCellValue(getCell(sheet, 23, 2), String.class));
			assertEquals("日付フォーマット 24", "40180.37712962963",ExcelUtils.getCellValue(getCell(sheet, 24, 2), String.class));
			assertEquals("日付フォーマット 25", "40180.37712962963",ExcelUtils.getCellValue(getCell(sheet, 25, 2), String.class));
			assertEquals("日付フォーマット 26", "40180.37712962963",ExcelUtils.getCellValue(getCell(sheet, 26, 2), String.class));

			assertEquals("日付フォーマット 27", "2010/01/02",ExcelUtils.getCellValue(getCell(sheet, 27, 2), String.class));
			assertEquals("日付フォーマット 28", "2010/01/02",ExcelUtils.getCellValue(getCell(sheet, 28, 2), String.class));
			assertEquals("日付フォーマット 29", "2010/01/02",ExcelUtils.getCellValue(getCell(sheet, 29, 2), String.class));
			assertEquals("日付フォーマット 30", "2010/01/02",ExcelUtils.getCellValue(getCell(sheet, 30, 2), String.class));
			assertEquals("日付フォーマット 31", "2010/01/02",ExcelUtils.getCellValue(getCell(sheet, 31, 2), String.class));
			assertEquals("日付フォーマット 32", "2010/01/02",ExcelUtils.getCellValue(getCell(sheet, 32, 2), String.class));
			assertEquals("日付フォーマット 33", "2010/01/02",ExcelUtils.getCellValue(getCell(sheet, 33, 2), String.class));
			assertEquals("日付フォーマット 34", "2010/01/02",ExcelUtils.getCellValue(getCell(sheet, 34, 2), String.class));
			assertEquals("日付フォーマット 35", "2010/01/02",ExcelUtils.getCellValue(getCell(sheet, 35, 2), String.class));
			assertEquals("日付フォーマット 36", "2010/01/02",ExcelUtils.getCellValue(getCell(sheet, 36, 2), String.class));
			assertEquals("日付フォーマット 37", "2010/01/02",ExcelUtils.getCellValue(getCell(sheet, 37, 2), String.class));

			assertEquals("日付フォーマット 38", "40180.37712962963",ExcelUtils.getCellValue(getCell(sheet, 38, 2), String.class));

			assertEquals("日付フォーマット 39", "2010/01/02",ExcelUtils.getCellValue(getCell(sheet, 39, 2), String.class));
			assertEquals("日付フォーマット 40", "2010/06/18",ExcelUtils.getCellValue(getCell(sheet, 40, 2), String.class));

		} finally {
			try { fileInputStream.close(); } catch (Exception e) { }
		}

	}

}
