added test for encodeNetstring