public boolean ping() {
        String checkPath = Joiner.on(PATH_DELIMITER).join(location,
                joinPrefix(prefixRepo, name));
        Status st = storage.checkPathExist(checkPath);
        if (!st.ok()) {
            errMsg = TimeUtils.longToTimeString(System.currentTimeMillis()) + ": " + st.getErrMsg();
            return false;
        }

        // clear err msg
        errMsg = null;

        return true;
    }
@Test
    public void testPing() {
        new Expectations() {
            {
                storage.checkPathExist(anyString);
                minTimes = 0;
                result = Status.OK;
            }
        };

        repo = new Repository(10000, "repo", false, location, storage);
        Assert.assertTrue(repo.ping());
        Assert.assertTrue(repo.getErrorMsg() == null);
    }