@Test
public void testDateEditorValueAsDate() throws ParseException  {

    DatePickerCellEditor editor = new DatePickerCellEditor();
    Date input = new Date();
    assertEquals("the input date must be unchanged", input, editor.getValueAsDate(input));
    assertEquals("input as long must be same", input, editor.getValueAsDate(input.getTime()));
    // PENDING: fails on server, moved out off the way into visual check for now
      String dateString = editor.getFormats()[0].format(input);
      Date fullCycle = editor.getFormats()[0].parse(dateString);
      assertEquals("the formatted input date string must be same", fullCycle, editor.getValueAsDate(dateString));
    String nonsenseString = "invalid";
    assertNull("invalid string maps to null", editor.getValueAsDate(nonsenseString));
    assertNull("empty String maps to null", editor.getValueAsDate(""));
    // same with date/string wrapped into TreeNode
    DefaultMutableTreeNode node = new DefaultMutableTreeNode(input);
    assertEquals("date must be user-object", input, editor.getValueAsDate(node));
    // same with date/string wrapped into a TreeTableNode
    DefaultMutableTreeTableNode tableNode = new DefaultMutableTreeTableNode(input);
    assertEquals("date must be user-object", input, editor.getValueAsDate(tableNode));
}