adding eunit test and refactor payload for close frame from undefined to empty list