public void IsManyToManyTest()
        {
            var cache = new EntityMetadataCache(orgService);

            var isManytoMany  = cache.GetManyToManyEntityDetails("queuemembership");
            var isManyToMany2 = cache.GetManyToManyEntityDetails("queuemembership");

            Assert.IsNotNull(isManytoMany);
            Assert.IsNotNull(isManyToMany2);
        }
        public void GetManyToManyEntityDetails()
        {
            string intersectEntityName = "accountcontactmtmed";

            var relationship = new ManyToManyRelationshipMetadata
            {
                IntersectEntityName = intersectEntityName
            };

            var manyToManyRelationships = new List <ManyToManyRelationshipMetadata>
            {
                relationship
            };

            RetrieveEntityResponse response = InjectMetaDataToResponse(new RetrieveEntityResponse(), null, null, manyToManyRelationships, true);

            MockOrganizationService.Setup(a => a.Execute(It.IsAny <OrganizationRequest>())).Returns(response);

            FluentActions.Invoking(() => systemUnderTest.GetManyToManyEntityDetails(intersectEntityName))
            .Should()
            .NotThrow();

            MockOrganizationService.VerifyAll();
        }