Fix Endpoint.String() and add more tests