@Test public void testOnlyOneActionNode_shouldClearFocusAndOverlayWhenActionPerformed() { mOptionManager.addFocusClearedListener(mMockListener); mOptionManager.clearFocusIfNewTree(mActionNode1); mOptionManager.selectOption(0); verify(mMockListener, times(2)).onOptionManagerClearedFocus(); verify(mOverlayController, times(2)).clearOverlay(); }
@Test public void testClearFocusIfNewTree_shouldClearFocusOnNewTree() { mOptionManager.addFocusClearedListener(mMockListener); mOptionManager.clearFocusIfNewTree(mSelectionNode); verify(mMockListener, times(1)).onOptionManagerClearedFocus(); }