@Test public void testCreateConverter() { EnumConverterProvider provider = new EnumConverterProvider(); assertEquals(EnumConverter.class, provider.converterType()); Converter converter = provider.createConverter(Gender.class); assertTrue(converter instanceof EnumConverter); EnumConverter enumConverter = (EnumConverter) converter; assertEquals(Gender.class, enumConverter.getEnumType()); }
@Override @SuppressWarnings("unchecked") public Converter createConverter(Class<?> valueType) { return new EnumConverter((Class<? extends Enum>) valueType); }
EnumConverterProvider implements ConverterProvider { @Override @SuppressWarnings("unchecked") public Converter createConverter(Class<?> valueType) { return new EnumConverter((Class<? extends Enum>) valueType); } }
EnumConverterProvider implements ConverterProvider { @Override @SuppressWarnings("unchecked") public Converter createConverter(Class<?> valueType) { return new EnumConverter((Class<? extends Enum>) valueType); }  }
EnumConverterProvider implements ConverterProvider { @Override @SuppressWarnings("unchecked") public Converter createConverter(Class<?> valueType) { return new EnumConverter((Class<? extends Enum>) valueType); }  @Override Class<? extends Converter> converterType(); @Override @SuppressWarnings("unchecked") Converter createConverter(Class<?> valueType); @Override Class<?> getValueType(); }
EnumConverterProvider implements ConverterProvider { @Override @SuppressWarnings("unchecked") public Converter createConverter(Class<?> valueType) { return new EnumConverter((Class<? extends Enum>) valueType); }  @Override Class<? extends Converter> converterType(); @Override @SuppressWarnings("unchecked") Converter createConverter(Class<?> valueType); @Override Class<?> getValueType();  }