Model the behavior of the output similar to the utility, by combining the same hops

Re-order to map round-trips to duplicates. Update the tests to validate the behavior.