### Question:
BPMNDiagramFilterProvider implements StunnerFormElementFilterProvider { void onFormFieldChanged(@Observes FormFieldChanged formFieldChanged) { final String adHocFieldName = BPMNDiagramImpl.DIAGRAM_SET + "." + DiagramSet.ADHOC; if (!Objects.equals(formFieldChanged.getName(), adHocFieldName)) { return; } refreshFormPropertiesEvent.fire(new RefreshFormPropertiesEvent(sessionManager.getCurrentSession(), formFieldChanged.getUuid())); } BPMNDiagramFilterProvider(); @Inject  BPMNDiagramFilterProvider(final SessionManager sessionManager,
                                     final DiagramTypeClientService diagramTypeService,
                                     final FieldChangeHandlerManager fieldChangeHandlerManager,
                                     final Event<RefreshFormPropertiesEvent> refreshFormPropertiesEvent); @Override Class<?> getDefinitionType(); @Override Collection<FormElementFilter> provideFilters(String elementUUID, Object definition);  }### Answer:
@Test public void onFormFieldChanged() { tested.onFormFieldChanged(formFieldChanged); final ArgumentCaptor<RefreshFormPropertiesEvent> refreshFormPropertiesArgumentCaptor = ArgumentCaptor.forClass(RefreshFormPropertiesEvent.class); verify(refreshFormPropertiesEvent).fire(refreshFormPropertiesArgumentCaptor.capture()); RefreshFormPropertiesEvent refreshEvent = refreshFormPropertiesArgumentCaptor.getValue(); assertEquals(refreshEvent.getUuid(), UUID); assertEquals(refreshEvent.getSession(), session); }