Unit tests for BuildDestinationUri and its sub-functions