### Question:
RadixTree { public void insert(String key, String value) { if (key == null || key.isEmpty()) { throw new IllegalArgumentException(STRINGS.get("errorInEmptyNullKeyInstertion")); } char[] inputChars = key.toCharArray(); int noOfMatchedChars = 0; RadixTreeNode node = rootNode; RadixTreeNode newNode = null; int keyLength = inputChars.length; OUTER_LOOP : while (noOfMatchedChars < keyLength) { String nodeKey = node.getKey(); int i = 0; int maxLoop = nodeKey.length() > (keyLength - noOfMatchedChars) ? keyLength - noOfMatchedChars : nodeKey.length(); for (; i < maxLoop ; i++) { if (nodeKey.charAt(i) != inputChars[noOfMatchedChars]) { newNode = new RadixTreeNode(nodeKey.substring(0, i), null); RadixTreeNode parentNode = node.getParentNode(); parentNode.removeChildNode(node); parentNode.addChildNode(newNode); node.setKey(nodeKey.substring(i)); newNode.addChildNode(node); newNode.addChildNode(new RadixTreeNode(key.substring(noOfMatchedChars), value)); break OUTER_LOOP; } noOfMatchedChars++; } if (nodeKey.length() > maxLoop) { newNode = new RadixTreeNode(nodeKey.substring(0, i), value); RadixTreeNode parentNode = node.getParentNode(); parentNode.removeChildNode(node); parentNode.addChildNode(newNode); node.setKey(nodeKey.substring(i)); newNode.addChildNode(node); break; } if (noOfMatchedChars == keyLength) { if (node.getValue() != null && !node.getValue().isEmpty()) { LOGGER.log(Level.INFO, SLogger.CHANGE_IN_VALUE, new Object[] {node.getValue(), value}); } node.setValue(value); break; } RadixTreeNode matchedNode = node.getChildNode(inputChars[noOfMatchedChars]); if (matchedNode == null) { node.addChildNode(new RadixTreeNode(key.substring(noOfMatchedChars), value)); break; } node = matchedNode; } } RadixTree(); void insert(String key, String value);  }### Answer:
@Test(expectedExceptions = IllegalArgumentException.class) public void testInsertionForNullKey() { _tree.insert(null, "value"); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testInsertionForEmptyKey() { _tree.insert(null, "value"); }