### Question:
BinaryTimeTree { public int maxValuesPerNodeInteral(BTreeNode<E> node, int maxValues) { if (node == null) { return 0; } int max = maxValues; int size = node.getValues().size(); if (size > max) { max = size; } for (BTreeNode<E> subNode : node.getSubNodes()) { if (subNode != null) { size = maxValuesPerNodeInteral(subNode, max); } if (size > max) { max = size; } } return max; } BinaryTimeTree();  BinaryTimeTree(int maxValuesPerNode, int maxDepth); void clear(); int countInRange(TimeSpan range); CountReport countsInBins(TimeSpan overAllRange, int numberOfBins); TIntList countsInRanges(List<TimeSpan> countTimes); List<E> findInRange(TimeSpan range); boolean insert(E tsProvider); boolean insert(List<E> collection); int internalSize(BTreeNode<E> node); int maxValuesPerNodeInteral(BTreeNode<E> node, int maxValues); int queryMaxValuesPerNode(); int size();  }### Answer:
@Test public void testMaxValuesPerNodeInteral() { TimeSpan span1 = new TimeSpanLongLong(0, 1); TimeSpan span2 = new TimeSpanLongLong(1, 2); TimeSpanProvider mock1 = createNiceMock(TimeSpanProvider.class); TimeSpanProvider mock2 = createNiceMock(TimeSpanProvider.class); TimeSpanProvider mock3 = createNiceMock(TimeSpanProvider.class); TimeSpanProvider mock4 = createNiceMock(TimeSpanProvider.class); TimeSpanProvider mock5 = createNiceMock(TimeSpanProvider.class); expect(mock1.getTimeSpan()).andReturn(span1).anyTimes(); expect(mock2.getTimeSpan()).andReturn(span2).anyTimes(); replay(mock1, mock2); BTreeNode<TimeSpanProvider> node = new BTreeNode<>(); node.getValues().add(mock1); node.getValues().add(mock2); BTreeNode<TimeSpanProvider> subNode = new BTreeNode<>(); subNode.getValues().add(mock3); subNode.getValues().add(mock4); subNode.getValues().add(mock5); node.getSubNodes().add(subNode); assertEquals(3, myTestObject.maxValuesPerNodeInteral(node, 1)); }
@Test public void testMaxValuesPerNodeInteralNull() { assertEquals(0, myTestObject.maxValuesPerNodeInteral(null, 5)); }
@Test public void testMaxValuesPerNodeInteralEmpty() { assertEquals(5, myTestObject.maxValuesPerNodeInteral(new BTreeNode<>(), 5)); }