DeprecatedEnumConverter extends AbstractConverter { @Override public Object convert(Type targetType, Object sourceValue) { return this.converter.convert(targetType, sourceValue); }  @Override Object convert(Type targetType, Object sourceValue);  }
@Test void convertValid() { assertEquals(EnumTest.VALUE, this.enumConverter.convert(EnumTest.class, "VALUE")); }
@Test void convertIgnoreCase() { assertEquals(EnumTest.VALUE, this.enumConverter.convert(EnumTest.class, "value")); }
@Test void convertInvalid() { Throwable exception = assertThrows(ConversionException.class, () -> this.enumConverter.convert(EnumTest.class, "notexistingvalue")); assertEquals("Unable to convert value [notexistingvalue]. Allowed values are (case insensitive) \"VALUE\".", exception.getMessage()); }
@Test void testConvertNull() { assertNull(this.enumConverter.convert(EnumTest.class, null)); }