Merge "Add tests for TransportStats and some refactor"