Throws if there's duplicate hubs in connection data.
- Added unit tests.

#1448
Made changes from CR feedback.