@Override
    public boolean isMaster() {
        List<ChildData<T>> children = getActiveChildren();
        children.sort(sequenceComparator);
        return !children.isEmpty() && children.get(0).getPath().equals(id);
    }
@Test
    public void testIsMaster() throws Exception {
        putChildData(group, PATH + "/001", "container1");
        putChildData(group, PATH + "/002", "container2");
        putChildData(group, PATH + "/003", "container3");

        group.setId(PATH + "/001");
        assertThat(group.isMaster(), equalTo(true));
        group.setId(PATH + "/002");
        assertThat(group.isMaster(), equalTo(false));
    }