def METHOD_NAME(
    self, a_host_session, mock_entity_reference_pager_interface, mock_logger
):
    exception_what = "Mocked exception"
    def raise_exception(self):
        raise Exception(exception_what)
    mock_entity_reference_pager_interface.mock.close.side_effect = raise_exception
    pager = EntityReferencePager(mock_entity_reference_pager_interface, a_host_session)
    del pager
    mock_entity_reference_pager_interface.mock.close.assert_called_once_with(a_host_session)
    args, kwargs = mock_logger.mock.log.call_args
    # The .what() of the exception comes with a lot of additional
    # text about call location that would be overly verbose to check
    assert LoggerInterface.Severity.kError == args[0]
    assert exception_what in args[1]