Adds a test for Datagram constructor.