Completed a test for _build_metadata().