public static String validatePath(String path) {
        if (!path.startsWith(AGENT_PATH)) {
            return "";
        }

        String fixPath = path;
        for (String symbol : INVALID_SYMBOL) {
            fixPath = fixPath.replace(symbol, "");
        }
        return fixPath;
    }
@Test
    public void testPath() {
        String pathValid = FileUtils.class.getProtectionDomain().getCodeSource().getLocation().getPath();
        Assert.assertEquals(pathValid, FileUtils.validatePath(pathValid));
        String pathInvalid = "/test/path";
        Assert.assertEquals("", FileUtils.validatePath(pathInvalid));
        String pathInvalidSymbolA = pathValid + "../" + "/test";
        Assert.assertEquals(pathValid + "/test", FileUtils.validatePath(pathInvalidSymbolA));
        String pathInvalidSymbolB = pathValid + "..\\" + "/test";
        Assert.assertEquals(pathValid + "/test", FileUtils.validatePath(pathInvalidSymbolB));
    }