public static async Task <MockAgent> CreateAsync(string agentName, WalletConfiguration configuration, WalletCredentials credentials, ServiceCollection services, string issuerSeed = null, bool useMessageTypesHttps = false)
        {
            var provider = services.BuildServiceProvider();

            await provider.GetService <IProvisioningService>()
            .ProvisionAgentAsync(new AgentOptions
            {
                EndpointUri          = $"http://{agentName}",
                IssuerKeySeed        = issuerSeed,
                WalletConfiguration  = configuration,
                WalletCredentials    = credentials,
                UseMessageTypesHttps = useMessageTypesHttps
            });

            return(new MockAgent(agentName, provider)
            {
                Context = new DefaultAgentContext
                {
                    Wallet = await provider.GetService <IWalletService>().GetWalletAsync(configuration, credentials),
                    Pool = new PoolAwaitable(PoolUtils.GetPoolAsync),
                    SupportedMessages = AgentUtils.GetDefaultMessageTypes(),
                    UseMessageTypesHttps = useMessageTypesHttps
                },
                ServiceProvider = provider
            });
        }