I have a server client application (legacy code), that is unit tested. It tests that the udp recieve port:
CPPUNIT_ASSERT_MESSAGE("Remote port not valid.