EnumConverter implements Converter<E> { public String toString(E value) { return value.toString(); } EnumConverter(Property<E> property);  EnumConverter(Property<E> property, int resId); String toString(E value); @SuppressWarnings("unchecked") @Override E fromString(String string);  }
@Test public void testFromProperty() throws Exception { EnumConverter<Encoding> converter = new EnumConverter<Encoding>( new Foo().enumP); assertEquals("UTF_8", converter.toString(Encoding.UTF_8)); }