### Question:
HitPolicyPopoverImpl extends AbstractPopoverImpl<HitPolicyPopoverView, HasHitPolicyControl> implements HitPolicyPopoverView.Presenter { @Override public void bind(final HasHitPolicyControl bound, final int uiRowIndex, final int uiColumnIndex) { super.bind(bound, uiRowIndex, uiColumnIndex); refresh(); } HitPolicyPopoverImpl(); @Inject  HitPolicyPopoverImpl(final HitPolicyPopoverView view,
                                final TranslationService translationService,
                                final BuiltinAggregatorUtils builtinAggregatorUtils); @Override String getPopoverTitle(); @Override void bind(final HasHitPolicyControl bound,
                     final int uiRowIndex,
                     final int uiColumnIndex); @Override void setHitPolicy(final HitPolicy hitPolicy); @Override void setBuiltinAggregator(final BuiltinAggregator aggregator);  }### Answer:
@Test public void testBindNullControl() { reset(view); editor.bind(null, UI_ROW_INDEX, UI_COLUMN_INDEX); verifyZeroInteractions(view); }
@Test public void testBindNonNullControl() { reset(view); editor.bind(control, UI_ROW_INDEX, UI_COLUMN_INDEX); verify(view).enableHitPolicies(eq(false)); verify(view).enableBuiltinAggregators(eq(false)); }
@Test public void testBindNonNullControlHitPolicy() { final HitPolicy hitPolicy = HitPolicy.ANY; reset(view); when(control.getHitPolicy()).thenReturn(hitPolicy); editor.bind(control, UI_ROW_INDEX, UI_COLUMN_INDEX); verify(view).enableHitPolicies(eq(true)); verify(view).initSelectedHitPolicy(eq(hitPolicy)); verify(view).enableBuiltinAggregators(eq(false)); }
@Test public void testShowNonNullControl() { editor.bind(control, UI_ROW_INDEX, UI_COLUMN_INDEX); reset(view); editor.show(); verify(view).show(eq(Optional.empty())); }
@Test public void testHideNonNullControl() { editor.bind(control, UI_ROW_INDEX, UI_COLUMN_INDEX); reset(view); editor.hide(); verify(view).hide(); }