public Session.Status readStatus() {
        try {
            Optional<byte[]> data = curator.getData(sessionStatusPath);
            return data.map(d -> Session.Status.parse(Utf8.toString(d))).orElse(Session.Status.UNKNOWN);
        } catch (Exception e) {
            log.log(Level.INFO, "Failed to read session status from " + sessionStatusPath.getAbsolute() +
                    ", returning session status 'unknown'");
            return Session.Status.UNKNOWN;
        }
    }
@Test
    public void require_that_status_is_read_from_zk() {
        int sessionId = 3;
        SessionZooKeeperClient zkc = createSessionZKClient(sessionId);
        curator.set(sessionPath(sessionId).append(SESSIONSTATE_ZK_SUBPATH), Utf8.toBytes("PREPARE"));
        assertEquals(Session.Status.PREPARE, zkc.readStatus());
    }