def contains_one_element_of_class(obj_cls, iterable_obj):
    """
    Asserts that the specified iterable object contains one and only one element of the specified class.

    :param obj_cls: the class of the object that is expected to be found in the iterable.
    :param iterable_obj: :class:`~collections.abc.Iterable` object.
    :raises: :class:`AssertionError` if the callable does not raise an exception of the specified class.
    """
    if len(iterable_obj) != 1 or type(iterable_obj[0]) is not obj_cls:
        raise AssertionError(
            "Iterable should contain one and only one object of class '{0}'."
            .format(obj_cls.__name__))
