Added connection encoding in test