'Tests that creating a v3 client and requesting a microversion that
is available in the server and supported by the client will result in
creating a Client object with the requested microversion.'

@mock.patch('cinderclient.client.get_highest_client_server_version', return_value=cinder_api_versions.MAX_VERSION)
@mock.patch('cinderclient.client.get_volume_api_from_url', return_value='3')
def test_create_v3_client_with_microversion_available(self, get_volume_api, get_highest_version):

    client = cinder.cinderclient(self.ctxt, microversion='3.27')
    self.assertEqual(cinder_api_versions.APIVersion('3.27'), client.api_version)
    get_volume_api.assert_called_once_with(self.mock_session.get_endpoint.return_value)
    get_highest_version.assert_called_once_with(self.mock_session.get_endpoint.return_value)
