In the curator-test sub-model the TestingServer class is provided. This class creates a local, in-process ZooKeeper server that can be used for testing.
In the curator-test sub-model the TestingCluster class is provided. This class creates an internally running ensemble of ZooKeeper servers.
Look at the various Curator unit tests to see how these utilities are used.