Add test for same subnet allocation

Also tidy up redundant code.

[#80656918]

Signed-off-by: Glyn Normington <gnormington@pivotal.io>