class CommentsPresenter implements ReplyView.Listener, CommentsAdapter.Listener, LoaderManager.LoaderCallbacks<Cursor> {

    public boolean onOptionsItemSelected(MenuItem item) {

        switch (item.getItemId()) {
            case R.id.action_bookmark:
                if (item.isChecked()) {
                    onBookmarkUnselected(item);
                } else {
                    onBookmarkSelected(item);
                }
                return true;
            case android.R.id.home:
                activity.finish();
                return true;
            default:
                return false;
        }

    }

}

class CommentsPresenterTest {

    @Mock CommentsActivity activity;
    @Mock SwipeRefreshLayout.OnRefreshListener refreshListener;
    @Mock MenuItem menuItem;
    @Mock CommentsView commentsView;
     CommentsPresenter commentsPresenter;

    @Test
    public void removesBookmarkWhenBookmarkItemWasSelected() {

        when(menuItem.getItemId()).thenReturn(R.id.action_bookmark);
        when(menuItem.isChecked()).thenReturn(true);

        commentsPresenter.onOptionsItemSelected(menuItem);

        verify(menuItem).setIcon(R.drawable.ic_bookmark_outline_white);
        verify(menuItem).setChecked(false);
    }

}