### Question:
CalledElementFormProvider implements SelectorDataProvider { @Override @SuppressWarnings("unchecked") public SelectorData getSelectorData(final FormRenderingContext context) { requestProcessDataEvent.fire(new RequestProcessDataEvent()); return new SelectorData(toMap(dataProvider.getProcessIds()), null); }  @Override String getProviderName(); @PostConstruct void populateData(); @Override @SuppressWarnings("unchecked") SelectorData getSelectorData(final FormRenderingContext context); static void initServerData(); static Event<RequestProcessDataEvent> getRequestProcessDataEventSingleton();  }### Answer:
@Test public void testGetSelectorData() { List<String> names = Arrays.asList("p1", "p2", "p3"); when(dataProvider.getProcessIds()).thenReturn(names); FormRenderingContext context = mock(FormRenderingContext.class); SelectorData data = tested.getSelectorData(context); Map values = data.getValues(); assertNotNull(values); assertEquals(3, values.size()); assertTrue(values.containsKey("p1")); assertTrue(values.containsKey("p2")); assertTrue(values.containsKey("p3")); verify(event, times(1)).fire(any(RequestProcessDataEvent.class)); }