public JunctionTree junctionTree(List<OpenBitSet> cliques, boolean init) {
        return junctionTree(null, null, null, cliques, init);
    }
@Test
    public void testJunctionWithPruning3() {
        Graph<BayesVariable> graph = new BayesNetwork();
        GraphNode x0 = addNode(graph);
        GraphNode x1 = addNode(graph);
        GraphNode x2 = addNode(graph);
        GraphNode x3 = addNode(graph);
        GraphNode x4 = addNode(graph);
        GraphNode x5 = addNode(graph);
        GraphNode x6 = addNode(graph);
        GraphNode x7 = addNode(graph);

        List<OpenBitSet> list = new ArrayList<OpenBitSet>();
        OpenBitSet OpenBitSet1 = bitSet("00001111");
        OpenBitSet OpenBitSet2 = bitSet("00011110");
        OpenBitSet OpenBitSet3 = bitSet("11100000");
        OpenBitSet OpenBitSet4 = bitSet("01100001");

        OpenBitSet intersect1And2 = OpenBitSet2.clone();
        intersect1And2.and(OpenBitSet1);

        OpenBitSet intersect2And3 = OpenBitSet2.clone();
        intersect2And3.and(OpenBitSet3);

        OpenBitSet intersect1And4 = OpenBitSet1.clone();
        intersect1And4.and(OpenBitSet4);

        OpenBitSet intersect3And4 = OpenBitSet3.clone();
        intersect3And4.and(OpenBitSet4);

        list.add(OpenBitSet1);
        list.add(OpenBitSet2);
        list.add(OpenBitSet3);
        list.add(OpenBitSet4);

        JunctionTreeBuilder jtBuilder = new JunctionTreeBuilder( graph );
        JunctionTreeClique jtNode = jtBuilder.junctionTree(list, false).getRoot();;
        JunctionTreeClique root = jtNode;

        assertThat(root.getBitSet()).isEqualTo(OpenBitSet1);
        assertThat(root.getChildren().size()).isEqualTo(2);
        JunctionTreeSeparator sep =  root.getChildren().get(0);
        assertThat(sep.getParent().getBitSet()).isEqualTo(OpenBitSet1);
        assertThat(sep.getChild().getBitSet()).isEqualTo(OpenBitSet2);
        assertThat(sep.getChild().getChildren().size()).isEqualTo(0);

        sep =  root.getChildren().get(1);
        assertThat(sep.getParent().getBitSet()).isEqualTo(OpenBitSet1);
        assertThat(sep.getChild().getBitSet()).isEqualTo(OpenBitSet4);
        assertThat(sep.getBitSet()).isEqualTo(intersect1And4);
        assertThat(sep.getChild().getChildren().size()).isEqualTo(1);

        jtNode = sep.getChild();
        assertThat(jtNode.getBitSet()).isEqualTo(OpenBitSet4);
        assertThat(jtNode.getChildren().size()).isEqualTo(1);
        sep =   jtNode.getChildren().get(0);
        assertThat(sep.getParent().getBitSet()).isEqualTo(OpenBitSet4);
        assertThat(sep.getChild().getBitSet()).isEqualTo(OpenBitSet3);
        assertThat(sep.getBitSet()).isEqualTo(intersect3And4);
        assertThat(sep.getChild().getChildren().size()).isEqualTo(0);
    }