### Question:
ImputeVisitor implements MultiVisitor<double[]> { public void accept(final Node node, final int depthOfNode) { double probabilityOfSeparation = CommonUtils.getProbabilityOfSeparation(node.getBoundingBox(), queryPoint); if (probabilityOfSeparation <= 0) { return; } rank = probabilityOfSeparation * scoreUnseen(depthOfNode, node.getMass()) + (1 - probabilityOfSeparation) * rank; } ImputeVisitor(double[] queryPoint, int numberOfMissingValues, int[] missingIndexes);   ImputeVisitor(ImputeVisitor original); double getRank(); void accept(final Node node, final int depthOfNode); @Override void acceptLeaf(final Node leafNode, final int depthOfNode); @Override double[] getResult(); @Override boolean trigger(final Node node); @Override MultiVisitor<double[]> newCopy(); @Override void combine(MultiVisitor<double[]> other);  }### Answer:
@Test public void testAccept() { double[] point = { queryPoint[0], 2.0, -111.11 }; Node node = spy(new Node(point)); int depth = 100; int leafMass = 10; when(node.getMass()).thenReturn(leafMass); visitor.acceptLeaf(node, depth); double[] expected = new double[] { -1.0, 2.0, 3.0 }; assertArrayEquals(expected, visitor.getResult()); assertEquals(defaultScoreUnseenFunction(depth, leafMass), visitor.getRank()); depth--; BoundingBox boundingBox = node.getBoundingBox().getMergedBox(new double[] { 99.0, 4.0, -19.0 }); node = spy(new Node(null, null, null, boundingBox)); when(node.getMass()).thenReturn(leafMass + 2); double oldRank = visitor.getRank(); visitor.accept(node, depth); assertArrayEquals(expected, visitor.getResult()); double p = CommonUtils.getProbabilityOfSeparation(boundingBox, expected); double expectedRank = p * defaultScoreUnseenFunction(depth, node.getMass()) + (1 - p) * oldRank; assertEquals(expectedRank, visitor.getRank(), EPSILON); }