def METHOD_NAME(running_app, rights, minimal_record):
    metadata = minimal_record["metadata"]
    # NOTE: this is done to get possible load transformations out of the way
    metadata = MetadataSchema().load(metadata)
    metadata["rights"] = rights
    assert metadata == MetadataSchema().load(metadata)