### Question:
PropertyEditors { public static Object getValue(final String type, final String value, final ClassLoader classLoader) throws PropertyEditorException { return REGISTRY.getValue(type, value, classLoader); }  static boolean isRegisterWithVM(); static void setRegisterWithVM(boolean registerWithVM); static void registerConverter(Converter converter); static boolean canConvert(final String type, final ClassLoader classLoader); static boolean canConvert(final Class<?> type); static String toString(final Object value); static Object getValue(final String type, final String value, final ClassLoader classLoader); static Object getValue(final Type type, final String value); static PropertyEditorRegistry registry();  }### Answer:
@Test public void propertyEditorIsUsed() throws Exception { final Blue expected = new Blue("blue"); calls.clear(); final Object actual = PropertyEditors.getValue(Blue.class, "blue"); assertNotNull(actual); assertEquals(expected, actual); final List<String> expectedCalls = Arrays.asList( "BlueEditor.setAsText", "Blue.constructor"); assertEquals(join(expectedCalls), join(calls)); }
@Test public void constructorIsUsed() throws Exception { final Orange expected = new Orange("orange"); calls.clear(); final Object actual = PropertyEditors.getValue(Orange.class, "orange"); assertNotNull(actual); assertEquals(expected, actual); assertEquals("Orange.constructor", join(calls)); }
@Test public void staticFactoryIsUsed() throws Exception { final Red expected = new Red("red"); calls.clear(); final Object actual = PropertyEditors.getValue(Red.class, "red"); assertNotNull(actual); assertEquals(expected, actual); final List<String> expectedCalls = Arrays.asList( "Red.valueOf", "Red.constructor"); assertEquals(join(expectedCalls), join(calls)); }