### Question:
RadixTree { RadixTreeNode getRootNode() { return _rootNode; } RadixTree(); void insert(String key, String value);  }### Answer:
@Test public void testTreeStructure() { RadixTreeNode rootNode = _tree.getRootNode(); assertEquals(rootNode.getKey(), ""); assertEquals(rootNode.getValue(), null); assertEquals(rootNode.getParentNode(), null); assertEquals(rootNode.getChildNodes().size(), 2); RadixTreeNode firstNode = rootNode.getChildNode('a'); RadixTreeNode secondNode = rootNode.getChildNode('s');; Assert.assertNotNull(firstNode); assertEquals(firstNode.getParentNode(), rootNode); Assert.assertNull(firstNode.getValue()); RadixTreeNode firstNodeFirstChild = firstNode.getChildNode('b'); assertEquals(firstNodeFirstChild.getValue(), "abVal"); assertEquals(firstNodeFirstChild.getParentNode(), firstNode); RadixTreeNode node = firstNodeFirstChild.getChildNode('e'); assertEquals(node.getValue(), "abetVal"); assertEquals(node.getKey(), "et"); assertEquals(node.getParentNode(), firstNodeFirstChild); node = firstNodeFirstChild.getChildNode('a'); assertEquals(node.getValue(), "abaitVal"); assertEquals(node.getKey(), "ait"); assertEquals(node.getParentNode(), firstNodeFirstChild); Assert.assertTrue(node.getChildNodes().isEmpty()); RadixTreeNode firstNodeSecondChild = firstNode.getChildNode('c'); assertEquals(firstNodeSecondChild.getValue(), "acidVal"); assertEquals(firstNodeSecondChild.getParentNode(), firstNode); assertEquals(firstNodeSecondChild.getKey(), "cid"); assertEquals(firstNodeSecondChild.getChildNodes().size(), 1); node = firstNodeSecondChild.getChildNode('i'); assertEquals(node.getValue(), "acidicVal"); assertEquals(node.getParentNode(), firstNodeSecondChild); Assert.assertTrue(node.getChildNodes().isEmpty()); assertEquals(secondNode.getParentNode(), rootNode); Assert.assertNull(secondNode.getValue()); RadixTreeNode secondNodeFirstChild = secondNode.getChildNode('i'); assertEquals(secondNodeFirstChild.getValue(), "sickVal"); assertEquals(secondNodeFirstChild.getParentNode(), secondNode); RadixTreeNode secondNodeSecondChild = secondNode.getChildNode('o'); assertEquals(secondNodeSecondChild.getValue(), null); assertEquals(secondNodeSecondChild.getParentNode(), secondNode); assertEquals(rootNode.getChildNodes().size(), 2); node = secondNodeSecondChild.getChildNode('n'); assertEquals(node.getValue(), "sonVal"); assertEquals(node.getParentNode(), secondNodeSecondChild); node = secondNodeSecondChild.getChildNode('f'); assertEquals(node.getValue(), "softVal"); assertEquals(node.getKey(), "ft"); assertEquals(node.getParentNode(), secondNodeSecondChild); }