RadarMenuBuilder implements MenuFactory.CustomMenuBuilder,
                                         RadarMenuView.Presenter { @SuppressWarnings("unused") public void onUpdateRadarEvent(final @Observes UpdateRadarEvent event) { final GuidedDecisionTableModellerView.Presenter modeller = event.getModeller(); if (modeller == null) { return; } if (!modeller.equals(this.modeller)) { return; } onClick(); } @Inject  RadarMenuBuilder(final RadarMenuView view); @PostConstruct void setup(); @Override void setModeller(final GuidedDecisionTableModellerView.Presenter modeller); @Override void push(final MenuFactory.CustomMenuBuilder element); @Override MenuItem build(); @SuppressWarnings("unused") void onUpdateRadarEvent(final @Observes UpdateRadarEvent event); @SuppressWarnings("unused") void onDecisionTablePinnedEvent(final @Observes DecisionTablePinnedEvent event); @SuppressWarnings("unused") void onDecisionTableSelectedEvent(final @Observes DecisionTableSelectedEvent event); @Override void onClick(); @Override void onDragVisibleBounds(final double canvasX,
                                    final double canvasY);  }
@Test public void testOnUpdateRadarEventNullModeller() { builder.onUpdateRadarEvent(new RadarMenuBuilder.UpdateRadarEvent(null)); verify(view, never()).setVisibleBounds(any(Bounds.class)); }
@Test public void testOnUpdateRadarEventDifferentModeller() { builder.onUpdateRadarEvent(new RadarMenuBuilder.UpdateRadarEvent(mock(GuidedDecisionTableModellerView.Presenter.class))); verify(view, never()).setVisibleBounds(any(Bounds.class)); }
@Test public void testOnUpdateRadarEventAssociatedModeller() { builder.onUpdateRadarEvent(new RadarMenuBuilder.UpdateRadarEvent(modeller)); verify(view, times(1)).reset(); verify(view, times(1)).setModellerBounds(eq(bounds)); verify(view, times(1)).setAvailableDecisionTables(eq(dtables)); verify(view, times(1)).setVisibleBounds(eq(visibleBounds)); }