Fix flaky test
Fix flaky test

- There was a nil pointer dereference on response when request to
dispatcher failed. The panic caused the AfterEach to run and led to
a data race.
https://main.bosh-ci.cf-app.com/teams/main/pipelines/bosh-agent/jobs/test-unit/builds/485

[#167214772]

Co-authored-by: Merric de Launey <79964dcbacbf8006d1234555614dad3bcf49e6d6@pivotal.io>

mattcui/bosh-agent,mattcui/bosh-agent,cloudfoundry/bosh-agent,mattcui/bosh-agent,gu-bin/bosh-agent,cloudfoundry/bosh-agent,gu-bin/bosh-agent,gu-bin/bosh-agent