def METHOD_NAME(self, mockExists, mockGetcwd, mockMakedirs):
    """
    Test fileCachePlugin
    """
    mockExists.return_value = False  # will create a file
    mockGetcwd.return_value = "/tornado/document/root"
    plugin = FileCacheLoggingPlugin()
    mockGetcwd.assert_called_once()
    mockExists.assert_called_once_with(os.path.join(mockGetcwd.return_value, "pilotlogs"))
    mockMakedirs.assert_called_once_with(os.path.join(mockGetcwd.return_value, "pilotlogs"))
    # sendMessage()
    messsageText = (
        "2022-02-23 13:48:35.123456 UTC DEBUG [PilotParams] JSON file loaded: pilot.json\n"
        + "2022-02-23 13:48:36.123456 UTC DEBUG [PilotParams] JSON file analysed: pilot.json"
    )
    messageJSON = json.dumps(messsageText)
    vo = "anyVO"
    pilotUUID = "78f39a90-2073-11ec-98d7-b496913c0cf4"
    # use a temporary dir, not the one above. Plugin will create the file to write into.
    with tempfile.TemporaryDirectory(suffix="pilottests") as d:
        plugin.meta["LogPath"] = d
        res = plugin.sendMessage(messageJSON, pilotUUID, vo)
        self.assertTrue(res["OK"])
        with open(os.path.join(d, vo, pilotUUID)) as pilotLog:
            content = pilotLog.read()
            self.assertEqual(content, messsageText)
    # failures ?
    with tempfile.TemporaryDirectory(suffix="pilottests") as d:
        plugin.meta["LogPath"] = d
        os.chmod(d, 0o0000)
        res = plugin.sendMessage(messageJSON, pilotUUID, vo)
        self.assertFalse(res["OK"])
    pilotUUID = "whatever"
    res = plugin.sendMessage(messageJSON, pilotUUID, vo)
    self.assertFalse(res["OK"])