test unit for tcp communication