def METHOD_NAME(app, db, minimal_oai_record, recid_pid):
    """"Test resource types."""
    minimal_oai_record['doi'] = '10.1234/foo'
    minimal_oai_record.update({'resource_type': {'type': 'dataset'}})
    obj = openaire_json_v1.transform_record(
        recid_pid, Record(minimal_oai_record))
    # Datasets use the DOI
    assert obj['originalId'] == '10.1234/foo'
    assert obj['collectedFromId'] == 'opendoar____::2659'
    assert obj['hostedById'] == 'opendoar____::2659'
    assert obj['resourceType'] == '0021'
    assert obj['type'] == 'dataset'
    minimal_oai_record.update({'resource_type': {'type': 'poster'}})
    obj = openaire_json_v1.transform_record(
        recid_pid, Record(minimal_oai_record))
    assert obj['originalId'] == 'oai:zenodo.org:123'
    assert obj['collectedFromId'] == 'opendoar____::2659'
    assert obj['hostedById'] == 'opendoar____::2659'
    assert obj['resourceType'] == '0004'
    assert obj['type'] == 'publication'