'Setup a test case environment.
Creates a fake volume object and sets up the required API responses.'

def setUp(self):

    super(TestManageExisting, self).setUp()
    ctx = context.RequestContext('fake', 'fake', auth_token=True)
    self.volume = fake_volume.fake_volume_obj(ctx, **{'provider_id': fake.PROVIDER_ID})
    self.volume_attached = fake_volume.fake_volume_obj(ctx, **{'provider_id': fake.PROVIDER2_ID})
    self.volume_no_provider_id = fake_volume.fake_volume_obj(ctx)
    self.volume_name_2x_enc = urllib.parse.quote(urllib.parse.quote(self.driver._id_to_base64(self.volume.id)))
    self.HTTPS_MOCK_RESPONSES = {self.RESPONSE_MODE.Valid: {('instances/Volume::' + self.volume['provider_id']): mocks.MockHTTPSResponse({'id': fake.PROVIDER_ID, 'sizeInKb': 8000000, 'mappedSdcInfo': None}, 200)}, self.RESPONSE_MODE.BadStatus: {('instances/Volume::' + self.volume['provider_id']): mocks.MockHTTPSResponse({'errorCode': 401, 'message': 'BadStatus    Volume    Test'}, 401), ('instances/Volume::' + self.volume_attached['provider_id']): mocks.MockHTTPSResponse({'id': fake.PROVIDER2_ID, 'sizeInKb': 8388608, 'mappedSdcInfo': 'Mapped'}, 200)}}
