Add BinTreeNodeWriter with tests