implemented the serialization of binary search tree and also related unit tests