def METHOD_NAME(
    metadata_extractors_by, testfiledir, filecount, expected, unexpected
):
    is_two_files = filecount == 2
    source_filename = "f-markdown-{0}-nikola.md".format(filecount)
    metadata_filename = "f-markdown-{0}-nikola.meta".format(filecount)
    source_path = os.path.join(testfiledir, source_filename)
    metadata_path = os.path.join(testfiledir, metadata_filename)
    post = FakePost(source_path, metadata_path, {}, None, metadata_extractors_by)
    assert os.path.exists(source_path)
    if is_two_files:
        assert os.path.exists(metadata_path)
    meta, extractor = get_meta(post, None)
    assert extractor is metadata_extractors_by["name"]["nikola"]
    assert meta["title"] == "T: Markdown, {0}, Nikola".format(filecount)
    assert meta["slug"] == "s-markdown-{0}-nikola".format(filecount)
    assert expected in meta["tags"]
    assert unexpected not in meta["tags"]
    assert "meta" in meta["tags"]
    assert "Nikola" in meta["tags"]
    assert "Markdown" in meta["tags"]
    assert meta["date"] == "2017-07-01 00:00:00 UTC"