MapEditor implements IsWidget, LeafAttributeEditor<Map<String, String>> { void addEntry() { onAddEntry(); } @Inject  MapEditor(final View view,
                     final Event<org.dashbuilder.common.client.event.ValueChangeEvent<Map<String, String>>> valueChangeEvent); @PostConstruct void init(); @Override void showErrors(final List<EditorError> errors); @Override Widget asWidget(); @Override void setValue(final Map<String, String> value); @Override Map<String, String> getValue(); public View view; }
@Test public void testAddEntry() throws Exception { presenter.addEntry(); assertEquals(1, presenter.getValue().size()); verify( valueChangeEvent, times( 1 ) ).fire(any(ValueChangeEvent.class)); assertSetViewValue(1); }