def METHOD_NAME(self, library, search_params, should_raise):
    child21, child22 = mock.Mock(), mock.Mock()
    child1 = mock.Mock()
    child1.GetChildren.return_value = [child21, child22]
    root_control = mock.Mock()
    root_control.GetChildren.return_value = [child1]
    with should_raise:
        leaf = library._get_control_from_path(search_params, root_control)
        assert leaf == child22