}
public void testBalanceSegmentPush() {
SegmentPush o;
ArrayList<PostingNode> nodes = new ArrayList<PostingNode>();
nodes.add(new PostingNode(1L, new ArrayBytes(new byte[]{11})));
nodes.add(new PostingNode(2L, new ArrayBytes(new byte[]{22})));
nodes.add(new PostingNode(3L, new ArrayBytes(new byte[]{33})));
nodes.add(new PostingNode(4L, new ArrayBytes(new byte[]{44})));
nodes.add(new PostingNode(5L, new ArrayBytes(new byte[]{55})));
nodes.add(new PostingNode(6L, new ArrayBytes(new byte[]{66})));
nodes.add(new PostingNode(7L, new ArrayBytes(new byte[]{77})));
o=BlueSteelBagIndex.balanceSegmentPush(new SegmentPush(nodes), 4);
compareSegments(o, new long[]{1,2,3,4,5,6,7});
assertEquals(7, o.getCount());
assertEquals(4, o.nodes.size());
o=BlueSteelBagIndex.balanceSegmentPush(new SegmentPush(nodes), 2);