public void PendingAuthnRequests_Remove_FalseOnRemovedTwice()
        {
            var id          = new Saml2Id();
            var requestData = new StoredRequestState(new EntityId("testidp"), new Uri("http://localhost/Return.aspx"));
            StoredRequestState responseData;
            var pendingAuthContainer = new PendingAuthInMemoryStorage();

            pendingAuthContainer.Add(id, requestData);
            pendingAuthContainer.TryRemove(id, out responseData).Should().BeTrue();
            pendingAuthContainer.TryRemove(id, out responseData).Should().BeFalse();
        }
        public void PendingAuthnRequests_Add_ThrowsOnExisting()
        {
            var id                   = new Saml2Id();
            var requestData          = new StoredRequestState(new EntityId("testidp"), new Uri("http://localhost/Return.aspx"));
            var pendingAuthContainer = new PendingAuthInMemoryStorage();

            pendingAuthContainer.Add(id, requestData);
            Action a = () => pendingAuthContainer.Add(id, requestData);

            a.ShouldThrow <InvalidOperationException>();
        }