added tests , fixed CommunicationStream