def METHOD_NAME(data_class):
    """Tests storing and retrieving a simple object."""
    with tempfile.TemporaryDirectory() as temporary_directory:
        local_storage = LocalFileStorage(temporary_directory)
        storage_object = data_class()
        # Make sure the validation fails
        with pytest.raises(ValueError):
            local_storage.store_object(storage_object)
        # This should now pass.
        storage_object.some_attribute = 10
        storage_key = local_storage.store_object(storage_object)
        assert local_storage.has_object(storage_object)
        retrieved_object, _ = local_storage.retrieve_object(storage_key)
        assert retrieved_object is not None
        assert storage_object.json() == retrieved_object.json()
        # Ensure that the same key is returned when storing duplicate
        # data
        new_storage_key = local_storage.store_object(storage_object)
        assert storage_key == new_storage_key