ConversionContext { public String getKey(){ return key; } protected  ConversionContext(Builder builder); String getKey(); List<PropertyValue> getValues(); TypeLiteral<?> getTargetType(); AnnotatedElement getAnnotatedElement(); Configuration getConfiguration(); Map<String, String> getMeta(); void addSupportedFormats(@SuppressWarnings("rawtypes") Class<?> converterType, String... formatDescriptors); List<String> getSupportedFormats(); Builder toBuilder(); @Override String toString(); @Deprecated ConfigurationContext getConfigurationContext(); static final ConversionContext EMPTY; }
@Test public void getSetKey() throws Exception { ConversionContext ctx = new ConversionContext.Builder("getKey", TypeLiteral.of(String.class)).build(); assertThat(ctx.getKey()).isEqualTo("getKey"); ctx = new ConversionContext.Builder("getKey", TypeLiteral.of(String.class)).setKey("setKey").build(); assertThat(ctx.getKey()).isEqualTo("setKey"); }