shared-network names weren't generated

Added unit tests for shared-network names and fixed problems with
generation.