### Question:
TabularCell { @Override public String toString() { if (cell == null) { return EMPTY_STRING; } final int cellType = cell.getCellType(); switch (cellType) { case CELL_TYPE_NUMERIC: { if (isCellDateFormatted(cell)) { final Date date = getJavaDate(cell.getNumericCellValue()); final String dateFmt = cell.getCellStyle().getDataFormatString(); return new CellDateFormatter(dateFmt).format(date); } final Double numericCellValue = cell.getNumericCellValue(); if (isMathematicalInteger(numericCellValue)) { return Integer.toString(numericCellValue.intValue()); } return Double.toString(numericCellValue); } case CELL_TYPE_BLANK: return EMPTY_STRING; case CELL_TYPE_BOOLEAN: return Boolean.toString(cell.getBooleanCellValue()); case Cell.CELL_TYPE_FORMULA: { cell.setCellType(cell.getCachedFormulaResultType()); return toString(); } case CELL_TYPE_STRING: final String stringCellValue = cell.getStringCellValue(); return quote(stringCellValue); case CELL_TYPE_ERROR: return FormulaError.forInt(cell.getErrorCellValue()).getString(); default: final CellReference cellReference = new CellReference(cell.getRowIndex(), cell.getColumnIndex()); throw new ExcelParsingException("Unregistered cell type: " + cellType + " at " + cellReference.formatAsString() + "!", new IllegalArgumentException("Not a registered POI cell type: " + cellType)); } } TabularCell(final Cell c, final String q);  TabularCell(final Cell c); @Override String toString(); static final String defaultQuote; }### Answer:
@Test public void testStringValuedCell() { assertEquals(TEST_STRING_PRINTED_VALUE, new TabularCell(stringCell).toString()); }
@Test public void testIntegerValuedCell() { assertEquals(TEST_INTEGER_PRINTED_VALUE, new TabularCell(integerCell).toString()); }
@Test public void testDecimalValuedCell() { assertEquals(TEST_DECIMAL_PRINTED_VALUE, new TabularCell(decimalCell).toString()); }
@Test public void testEmptyCell() { assertTrue(new TabularCell(blankCell).toString().isEmpty()); }
@Test public void testBooleanValuedCell() { assertEquals(TEST_BOOLEAN_PRINTED_VALUE, new TabularCell(booleanCell).toString()); }
@Test(expected = ExcelParsingException.class) public void testFunkyValuedCell() { new TabularCell(funkyCell).toString(); }
@Test public void testErrorValuedCell() { for (final FormulaError error : FormulaError.values()) { when(errorCell.getCellType()).thenReturn(CELL_TYPE_ERROR); when(errorCell.getErrorCellValue()).thenReturn(error.getCode()); assertEquals(error.getString(), new TabularCell(errorCell).toString()); } }
@Test public void testFormulaValuedCell() { assertEquals(TEST_INTEGER_PRINTED_VALUE, new TabularCell(formulaCell).toString()); }
@Test public void testNullCell() { assertTrue(new TabularCell(nullCell).toString().isEmpty()); }
@Test public void testDateValuedCell() { assertEquals(TEST_DATE_PRINTED_VALUE, new TabularCell(dateCell).toString()); }