### Question:
RightClickCenterer implements MouseClickClosure { @Override public void mouseClicked(MouseButton button, MetaKey key, Coordinate coordinate, int clickCount) { if (button != MouseButton.Secondary) { return; } if (key != MetaKey.NONE) { return; } polygonPanel.centerOn(coordinate); } RightClickCenterer(PolygonPanel polygonPanel); @Override void mouseClicked(MouseButton button, MetaKey key, Coordinate coordinate, int clickCount);  }### Answer:
@Test public void centersPanelOnCursorPositionOnRightClick() throws Exception { centerer.mouseClicked(MouseButton.Secondary, MetaKey.NONE, AnyCoordinate, 1); verify(panel).centerOn(AnyCoordinate); }
@Test public void doesNotReactOnLeftClick() throws Exception { centerer.mouseClicked(MouseButton.Primary, MetaKey.NONE, AnyCoordinate, 1); verifyZeroInteractions(panel); }
@Test public void doesNotReactOnClickWithCtrl() throws Exception { centerer.mouseClicked(MouseButton.Secondary, MetaKey.CTRL, AnyCoordinate, 1); verifyZeroInteractions(panel); }