}
}
@Test
public void testFakeZoo() throws DistributedStoreException {
DistributedStore store = new FakeZooStore();
store.put("/a/b/c", "abc".getBytes());
byte[] abc = store.get("/a/b/c");
assertArrayEquals(abc, "abc".getBytes());
byte[] empty = store.get("/a/b");
assertArrayEquals(empty, "".getBytes());
store.put("/a/b", "ab".getBytes());
assertArrayEquals(store.get("/a/b"), "ab".getBytes());
store.put("/a/b/b", "abb".getBytes());
List<String> children = store.getChildren("/a/b");
assertEquals(new HashSet<String>(children), new HashSet<String>(Arrays.asList("b", "c")));
store.remove("/a/b/c");
children = store.getChildren("/a/b");
assertEquals(new HashSet<String>(children), new HashSet<String>(Arrays.asList("b")));
}