### Question:
EnumConverter implements MapperConfig.CustomEnumConverter<T> { @Override public T fromString(final String text) { T val = values.get(text); if (val == null) { throw new IllegalArgumentException("Illegal " + enumType + " enum value: " + text); } return val; } EnumConverter(final Class<T> aClass); @Override // no need of cache here, it is already fast String toString(final T instance); @Override T fromString(final String text); @Override String toString(); @Override Type type();  }### Answer:
@Test public void fromStringToEnum() { assertEquals(AnEnum.B, new EnumConverter<AnEnum>(AnEnum.class).fromString("B")); }