def METHOD_NAME(self) -> None:
    root = self.mkdtemp()
    expect_hex = self.write_file_and_hash(os.path.join(root, "foo"), "hello\n")
    expect_bar_hex = self.write_file_and_hash(
        os.path.join(root, "bar"), "different\n"
    )
    with open(os.path.join(root, ".watchmanconfig"), "w") as f:
        f.write(json.dumps({"content_hash_max_items": 1}))
    self.watchmanCommand("watch", root)
    self.assertFileList(root, [".watchmanconfig", "foo", "bar"])
    res = self.watchmanCommand(
        "query",
        root,
        {"path": ["foo", "bar"], "fields": ["name", "content.sha1hex"]},
    )
    self.assertEqual(
        [
            {"name": "bar", "content.sha1hex": expect_bar_hex},
            {"name": "foo", "content.sha1hex": expect_hex},
        ],
        sorted(res["files"], key=lambda k: k["name"]),
    )
    stats = self.watchmanCommand("debug-contenthash", root)
    # ensure that we pruned the cache back to match the content_hash_max_items
    self.assertEqual(stats["size"], 1)
    self.assertEqual(stats["cacheHit"], 0)
    self.assertEqual(stats["cacheMiss"], 2)
    self.assertEqual(stats["cacheStore"], 2)
    self.assertEqual(stats["cacheLoad"], 2)