def METHOD_NAME():
    """Test the ``JsonableData`` constructor raises if object does not implement ``as_dict``."""
    class InvalidClass:
        pass
    with pytest.raises(TypeError, match=r'the `obj` argument does not have the required `as_dict` method.'):
        JsonableData(InvalidClass())