public void testDateToNumber(){
  NumberConverter converter=makeConverter();
  Date dateValue=new Date();
  long longValue=dateValue.getTime();
  assertEquals("Date to Long",new Long(longValue),converter.convert(Long.class,dateValue));
  try {
    converter.convert(Integer.class,dateValue);
    fail("Date to Integer - expected a ConversionException");
  }
 catch (  ConversionException e) {
  }
}

public void testDateToNumber ( ) { NumberConverter converter = makeConverter ( ) ; Date dateValue = new Date ( ) ; long longValue = dateValue . getTime ( ) ; assertEquals ( "Date to Long" , new Long ( longValue ) , converter . convert ( Long . class , dateValue ) ) ; try { converter . convert ( Integer . class , dateValue ) ; fail ( "Date to Integer - expected a ConversionException" ) ; } catch ( ConversionException e ) { } }
convert date - - > long
