func createExistingNode(path string) {
	conn, _, err := zk.Connect(servers, sessionTimeout)
	helpers.PanicError(err)

	defer conn.Close()

	cfg := NewDefaultServiceConfig()
	cfg.Namespaces["test"] = NewDefaultNamespaceConfig("test")

	reader, err := Marshal(cfg)
	helpers.PanicError(err)

	bytes, err := ioutil.ReadAll(reader)
	helpers.PanicError(err)

	key := hashConfig(bytes)

	_, err = conn.Create(path, []byte(key), 0, zk.WorldACL(zk.PermAll))
	helpers.PanicError(err)

	_, err = conn.Create(fmt.Sprintf("%s/%s", path, key), bytes, 0, zk.WorldACL(zk.PermAll))
	helpers.PanicError(err)
}
func TestMain(m *testing.M) {
	t, err := zk.StartTestCluster(1, nil, nil)
	helpers.PanicError(err)

	defer t.Stop()
	servers = make([]string, 1)
	servers[0] = fmt.Sprintf("localhost:%d", t.Servers[0].Port)

	createExistingNode("/existing")
	createExistingNode("/historic")
	r := m.Run()

	os.Exit(r)
}