added close() to client and build real communication tests