Fix tests using same Endpoint multiple times
Since 101c50f2, the visited
array is not reset before each
Traversal methods but instead only once in class constructor. This
change broke unit tests which were using multiple times the same
Endpoint.
Migrated from D1906 (view on Phabricator)