@Test public void testNonIntervalInput() { for (CellProcessor p : processors) { try { p.execute(123, ANONYMOUS_CSVCONTEXT); fail("expecting SuperCsvCellProcessorException"); } catch (SuperCsvCellProcessorException e) { assertEquals( "the input value should be of type org.joda.time.Interval but is java.lang.Integer", e.getMessage()); } } }
public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if (!(value instanceof Interval)) { throw new SuperCsvCellProcessorException(Interval.class, value, context, this); } final Interval interval = (Interval) value; final String result = interval.toString(); return next.execute(result, context); }
FmtInterval extends CellProcessorAdaptor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if (!(value instanceof Interval)) { throw new SuperCsvCellProcessorException(Interval.class, value, context, this); } final Interval interval = (Interval) value; final String result = interval.toString(); return next.execute(result, context); } }
FmtInterval extends CellProcessorAdaptor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if (!(value instanceof Interval)) { throw new SuperCsvCellProcessorException(Interval.class, value, context, this); } final Interval interval = (Interval) value; final String result = interval.toString(); return next.execute(result, context); } FmtInterval();  FmtInterval(final CellProcessor next); }
FmtInterval extends CellProcessorAdaptor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if (!(value instanceof Interval)) { throw new SuperCsvCellProcessorException(Interval.class, value, context, this); } final Interval interval = (Interval) value; final String result = interval.toString(); return next.execute(result, context); } FmtInterval();  FmtInterval(final CellProcessor next); Object execute(final Object value, final CsvContext context); }
FmtInterval extends CellProcessorAdaptor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if (!(value instanceof Interval)) { throw new SuperCsvCellProcessorException(Interval.class, value, context, this); } final Interval interval = (Interval) value; final String result = interval.toString(); return next.execute(result, context); } FmtInterval();  FmtInterval(final CellProcessor next); Object execute(final Object value, final CsvContext context);  }