Add test for datagram received

add tests for receiving datagram.