### Question:
SelectorFieldInitilizer implements FieldInitializer<SelectorFieldBaseDefinition> { @Override public void initialize(SelectorFieldBaseDefinition selectorFieldBaseDefinition, FieldElement fieldElement, FormGenerationContext context) { String dataProvider = fieldElement.getParams().get(SelectorDataProvider.class.getName()); if (dataProvider != null && !dataProvider.isEmpty()) { selectorFieldBaseDefinition.setDataProvider(dataProvider); } String relatedField = fieldElement.getParams().get("relatedField"); if (relatedField != null) { selectorFieldBaseDefinition.setRelatedField(relatedField); } }  @Override boolean supports(FieldDefinition fieldDefinition); @Override void initialize(SelectorFieldBaseDefinition selectorFieldBaseDefinition,
                           FieldElement fieldElement,
                           FormGenerationContext context);  }### Answer:
@Test public void testInitialize() { fieldElementParams.put(DATA_PROVIDER, DATA_PROVIDER); fieldElementParams.put(RELATED_FIELD, RELATED_FIELD); initializer.initialize(field, fieldElement, context); verify(field).setDataProvider(anyString()); verify(field).setRelatedField(anyString()); assertEquals(DATA_PROVIDER, field.getDataProvider()); assertEquals(RELATED_FIELD, field.getRelatedField()); }