move test socket to public interface