'Bookmark/Un-Bookmark a unit and then verify'

def _toggle_bookmark_and_verify(self, bookmark_icon_state, bookmark_button_state, bookmarked_count):

    self.assertTrue(self.courseware_page.bookmark_button_visible)
    self.courseware_page.click_bookmark_unit_button()
    self.assertEqual(self.courseware_page.bookmark_icon_visible, bookmark_icon_state)
    self.assertEqual(self.courseware_page.bookmark_button_state, bookmark_button_state)
    self.bookmarks_page.visit()
    self.assertEqual(self.bookmarks_page.count(), bookmarked_count)
