ZenMenu implements CircularMenu.MenuStateChangeListener, ZenSketch.PaintListener { public FloatingActionButton getButtonViewFor(MenuButton menuButton) { switch (menuButton) { case MENU: return (FloatingActionButton) getCircularMenu().getActionView(); default: return (FloatingActionButton) getCircularMenu().findSubActionViewWithId(menuButton.getId()); } } ZenMenu(ZenSketchView zenSketchView); static ZenMenu newInstance(ZenSketchView zenSketchView); void toggle(); FloatingActionButton getButtonViewFor(MenuButton menuButton); @Override void onMenuOpened(CircularMenu circularMenu); @Override void onMenuClosed(CircularMenu circularMenu); @Override void onPaintingStart(); @Override void onPaintingStop();  }
@Test public void testThatGetButtonViewForReturnsMenuButtonIfItIsRequested() { Assertions.assertThat(zenMenu.getButtonViewFor(MenuButton.MENU)).isEqualTo(menuButton); }
@Test public void testThatGetButtonViewForFindsButtonIfRequestedIsNotMenu() { zenMenu.getButtonViewFor(MenuButton.SHARE); verify(circularMenu).findSubActionViewWithId(MenuButton.SHARE.getId()); }