afterEach(function(done) {
        nock.cleanAll();

        iotAgentLib.clearAll(function() {
            iotagentUl.stop(done);
        });
    });
 iotagentMqtt.start(config, function() {
     iotAgentLib.clearAll(function() {
         request(provisionOptions, function(error, response, body) {
             done();
         });
     });
 });
 afterEach(function(done) {
     delete config.iota.iotManager;
     delete config.iota.defaultResource;
     iotAgentLib.clearAll();
     nock.cleanAll();
     mqttClient.end();
     iotagentMqtt.stop(done);
 });
 afterEach(function(done) {
     nock.cleanAll();
     mqttClient.end();
     iotAgentLib.clearAll(done);
 });
 iotagentMqtt.start(config, function() {
     iotAgentLib.clearAll(done);
 });