### Question:
RandomCutTree { public Node getRoot() { return root; } protected  RandomCutTree(Builder<?> builder); static Builder builder(); static RandomCutTree defaultTree(long randomSeed); static RandomCutTree defaultTree(); boolean centerOfMassEnabled(); boolean storeSequenceIndexesEnabled(); void deletePoint(WeightedPoint weightedPoint); void addPoint(WeightedPoint weightedPoint); R traverseTree(double[] point, Visitor<R> visitor); R traverseTreeMulti(double[] point, MultiVisitor<R> visitor); Node getRoot(); static final boolean DEFAULT_STORE_SEQUENCE_INDEXES_ENABLED; static final boolean DEFAULT_CENTER_OF_MASS_ENABLED; }### Answer:
@Test public void testInitialTreeState() { Node node = tree.getRoot(); BoundingBox expectedBox = new BoundingBox(new double[] { -1, -1 }).getMergedBox(new double[] { 1, 1 }); assertThat(node.getBoundingBox(), is(expectedBox)); assertThat(node.getCut().getDimension(), is(1)); assertThat(node.getCut().getValue(), closeTo(-0.5, EPSILON)); assertThat(node.getMass(), is(5)); assertArrayEquals(new double[] { -0.2, 0.4 }, node.getCenterOfMass(), EPSILON); assertThat(node.getLeftChild().isLeaf(), is(true)); assertThat(node.getLeftChild().getLeafPoint(), is(new double[] { -1, -1 })); assertThat(node.getLeftChild().getMass(), is(1)); assertThat(node.getLeftChild().getSequenceIndexes(), contains(1L)); node = node.getRightChild(); expectedBox = new BoundingBox(new double[] { -1, 0 }).getMergedBox(new double[] { 1, 1 }); assertThat(node.getBoundingBox(), is(expectedBox)); assertThat(node.getCut().getDimension(), is(0)); assertThat(node.getCut().getValue(), closeTo(0.5, EPSILON)); assertThat(node.getMass(), is(4)); assertArrayEquals(new double[] { 0.0, 0.75 }, node.getCenterOfMass(), EPSILON); assertThat(node.getRightChild().isLeaf(), is(true)); assertThat(node.getRightChild().getLeafPoint(), is(new double[] { 1, 1 })); assertThat(node.getRightChild().getMass(), is(1)); assertThat(node.getRightChild().getSequenceIndexes(), contains(2L)); node = node.getLeftChild(); expectedBox = new BoundingBox(new double[] { -1, 0 }).getMergedBox(new double[] { 0, 1 }); assertThat(node.getBoundingBox(), is(expectedBox)); assertThat(node.getCut().getDimension(), is(0)); assertThat(node.getCut().getValue(), closeTo(-0.5, EPSILON)); assertThat(node.getMass(), is(3)); assertArrayEquals(new double[] { -1.0 / 3, 2.0 / 3 }, node.getCenterOfMass(), EPSILON); assertThat(node.getLeftChild().isLeaf(), is(true)); assertThat(node.getLeftChild().getLeafPoint(), is(new double[] { -1, 0 })); assertThat(node.getLeftChild().getMass(), is(1)); assertThat(node.getLeftChild().getSequenceIndexes(), contains(3L)); assertThat(node.getRightChild().isLeaf(), is(true)); assertThat(node.getRightChild().getLeafPoint(), is(new double[] { 0, 1 })); assertThat(node.getRightChild().getMass(), is(2)); assertThat(node.getRightChild().getSequenceIndexes(), containsInAnyOrder(4L, 5L)); }