       runCallback = undefined
 
       before (done) ->
-        testFactory = new TestFactory()
-        test = testFactory.create()
-        test.name = 'GET /machines -> 200'
-        test.request.path = '/machines'
-        test.request.method = 'GET'
+        test = createStdTest()
         test.response.status = 200
         test.response.schema = """[
           type: 'string'

        hooksStub.runAfter.restore()

        runCallback = undefined

      it 'should generate beforeAll hooks', () ->
        mochaStub = runner.mocha

  'use strict'

  runner = undefined
  test = undefined

  createStdTest = () ->
    testname = 'GET /machines -> 200'
    testFactory = new TestFactory()
    stdTest = testFactory.create testname, undefined
    stdTest.request.path = '/machines'
    stdTest.request.method = 'GET'
    return stdTest


  describe '#run', () ->

    describe 'when test is valid', () ->

      beforeAllHook = undefined
      afterAllHook = undefined
      beforeHook = undefined
