why not write the HttpsServer as test layer? then you can avoid the globla