def METHOD_NAME(test_dir, object_name):
    from monty.json import MontyDecoder, jsanitize
    from emmet.core.tasks import TaskDoc
    test_object = get_test_object(object_name)
    dir_name = test_dir / "vasp" / test_object.folder
    test_doc = TaskDoc.from_directory(dir_name)
    assert_schemas_equal(test_doc, test_object.task_doc)
    # test document can be jsanitized
    d = jsanitize(test_doc, strict=True, enum_values=True, allow_bson=True)
    # and decoded
    MontyDecoder().process_decoded(d)
    # Test that additional_fields works
    test_doc = TaskDoc.from_directory(dir_name, additional_fields={"foo": "bar"})
    assert test_doc.dict()["foo"] == "bar"