@Test
    public void testPropertyEditor() throws Exception {

        // test
        Class<T> type = getType();
        PropertyEditor editor = PropertyEditorManager.findEditor(type);

        String[] inputData = getInputData();
        Object[] expectedData = getOutputData();
        String[] expectedStringData = getConvertedToText();
        try {
            assertTrue("Did not find property editor for type: " + type, editor != null);
            assertEquals("Editor has wrong package!", this.getClass().getPackage(), editor.getClass().getPackage());
            logger.finest("Found property editor for: " + type + ", editor=" + editor.getClass().getName());
            assertEquals(editor + " input length", inputData.length, expectedData.length);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }

        for (int i = 0; i < inputData.length; i++) {
            String input = inputData[i];
            editor.setAsText(input);
            // TODO: check instance?
            T expected = (T) expectedData[i];
            T output = (T) editor.getValue();

            Comparator<T> c = getComparator();
            boolean equals = false;
            if (c == null) {
                equals = output != null ? output.equals(expected) : expected == null;
            } else {
                equals = c.compare(output, expected) == 0;
            }

            assertTrue("Test at index '" + i + "'. Transform(" + editor + ") of " + input + "\n does not equal! \nexpected = " + logT(expected) + "\noutput = "
                    + logT(output), equals);

            String expectedStringOutput = expectedStringData[i];
            String stringOutput = editor.getAsText();
            logger.finest("setAsText '" + logString(input) + "'");
            logger.finest("getAsText '" + logString(stringOutput) + "'");
            if (type != Properties.class) {
                // We can't meaningfully compare the PropertiesEditor string output
                String msg = "Test at index '" + i + "'. PropertyEditor: " + editor.getClass().getName()
                        + ", getAsText() == expectedStringOutput '";
                assertEquals(msg, expectedStringOutput, stringOutput);
            }

        }

    }