'Test the save_state function.'

def test_should_return_a_valid_state_on_save_state(self):

    items = self._create_top_item()
    tree_helper = BranchesTreeHelper()
    result = tree_helper.save_state(items[u'top'])
    self.assertEqual({u'top': {u'child_1': {}, u'child_2': {u'sub_child_2_1': {}, u'sub_child_2_2': {}}}}, result)
