@Test
public void testSetExpiredTsToZk() throws Exception {

  long ts = System.currentTimeMillis() - 10l * 86400 * 1000;
  ThemisMasterObserver masterObserver = new ThemisMasterObserver();
  masterObserver.zk = new ZooKeeperWatcher(conf, "test", null, true);
  masterObserver.themisExpiredTsZNodePath = ThemisMasterObserver.getThemisExpiredTsZNodePath(masterObserver.zk);
  masterObserver.setExpiredTsToZk(ts);
  Assert.assertEquals(ts, ThemisMasterObserver.getThemisExpiredTsFromZk(masterObserver.zk));
  
  // test get data from not-exist path
  Assert.assertEquals(Long.MIN_VALUE,
    ThemisMasterObserver.getThemisExpiredTsFromZk(masterObserver.zk,
      masterObserver.themisExpiredTsZNodePath + "/" + System.currentTimeMillis()));
  masterObserver.zk.close();
}