BinaryTreeSerialization { public String serialize(BinaryNode root) { validateInputTree(root); return serializeInner(root); } BinaryTreeSerialization(); String serialize(BinaryNode root); BinaryNode<Integer> deserialize(String tree);  }
@Test(expected = IllegalArgumentException.class) public void shouldNotAcceptNullBinaryTreesToSerialize() { binaryTreeSerialization.serialize(null); }