### Question:
EditorFieldLayoutComponent extends FieldLayoutComponent implements HasDragAndDropSettings,
                                                                                HasModalConfiguration { @Override public void init(FormRenderingContext renderingContext, FieldDefinition field) { super.init(renderingContext, field); initPropertiesConfig(); } @Inject  EditorFieldLayoutComponent(FieldRendererManager fieldRendererManager,
                                      TranslationService translationService,
                                      FieldPropertiesRenderer propertiesRenderer,
                                      FieldManager fieldManager,
                                      Event<FormEditorSyncPaletteEvent> syncPaletteEvent); @Override void init(FormRenderingContext renderingContext,
                     FieldDefinition field); @Override String[] getSettingsKeys(); @Override void setSettingValue(String key,
                                String value); @Override String getSettingValue(String key); @Override Map<String, String> getMapSettings(); @Override Modal getConfigurationModal(final ModalConfigurationContext ctx); final String[] SETTINGS_KEYS; }### Answer:
@Test public void testDroppingNewField() { editorFieldLayoutComponent.getShowWidget(ctx); verify(editorFieldLayoutComponent).init(context, fieldDefinition); verify(fieldRenderer).init(context, fieldDefinition); verify(fieldRenderer).renderWidget(); }
@Test public void testRenderingExistingField() { testDroppingNewField(); editorFieldLayoutComponent.getShowWidget(ctx); verify(editorFieldLayoutComponent, times(1)).init(context, fieldDefinition); verify(fieldRenderer, times(1)).init(context, fieldDefinition); verify(fieldRenderer, times(2)).renderWidget(); }
@Test public void testReceivingWrongContextResponses() { testDroppingNewField(); verify(editorFieldLayoutComponent, times(1)).init(context, fieldDefinition); verify(fieldRenderer, times(1)).init(context, fieldDefinition); verify(editorFieldLayoutComponent, times(1)).init(context, fieldDefinition); verify(fieldRenderer, times(1)).init(context, fieldDefinition); }
@Test public void testReceivingResponsesWhenDisabled() { verify(editorFieldLayoutComponent, never()).init(context, fieldDefinition); verify(fieldRenderer, never()).init(context, fieldDefinition); }