spinner.setModel(new SpinnerListModel(values));
ListEditor listEditor = new ListEditor(spinner);
spinner.setEditor(listEditor);
AbstractFormatter formatter = ((ListEditor) spinner.getEditor()).getTextField()
.getFormatter();
assertEquals(formatter.valueToString(null), "");
assertEquals(formatter.valueToString(new Integer(33)), "33");
assertEquals(formatter.stringToValue("text"), "text");
}
}