def METHOD_NAME(self) -> None:
    client = self.getClient()
    res = client.capabilityCheck(optional=["term-match", "will-never-exist"])
    self.assertDictEqual(
        res["capabilities"], {"term-match": True, "will-never-exist": False}
    )
    res = client.capabilityCheck(
        required=["term-match"], optional=["will-never-exist"]
    )
    self.assertDictEqual(
        res["capabilities"], {"term-match": True, "will-never-exist": False}
    )
    with self.assertRaisesRegex(
        pywatchman.CommandError,
        "client required capabilities \\[will-never-exist\\] not "
        + "supported by this server",
    ):
        client.capabilityCheck(required=["term-match", "will-never-exist"])