text: 'use strict'
  
  const {
    Socket
  } = require('net')
  const {
    as, AsyncObject
  } = require('@cuties/cutie')
  const {
    Assertion
  } = require('@cuties/assert')
  const {
    Is
  } = require('@cuties/is')
  const {
    ClosedServer,
    HttpsRequest,
    EndedRequest,
    SocketOfIncomingMessage
  } = require('./../../index')
  const {
    FakeServer
  } = require('./../../fake')
  
  const port = 8021
  const hostname = '127.0.0.1'
  const options = {
    hostname: hostname,
    port: port,
    path: '/',
    method: 'GET'
  }
  
  class GeneratedRequestCallback extends AsyncObject {
    constructor (server) {
      super(server)
    }
  
    syncCall () {
      return (server) => {
        return (res) => {
          new Assertion(
            new Is(
              new SocketOfIncomingMessage(res), Socket
            )
          ).after(
            new ClosedServer(server)
          ).call()
        }
      }
    }
  }
  
  FakeServer(port).as('server').after(
    new EndedRequest(
      new HttpsRequest(
        options, new GeneratedRequestCallback(
          as('server')
        )
      )
    )
  ).call()
  