public void AssignEntities()
        {
            testOrgService.ExecutionResponse = new ExecuteMultipleResponse();

            MockRetryExecutor.Setup(a => a.Execute(It.IsAny <Func <ExecuteMultipleResponse> >()))
            .Returns(requestResult);

            FluentActions.Invoking(() => systemUnderTest.AssignEntities(entities))
            .Should()
            .NotThrow();

            MockRetryExecutor.VerifyAll();
        }
        public void AssociateManyToManyEntity()
        {
            testOrgService.ExecutionResponse = new RetrieveEntityResponse();

            MockRetryExecutor.Setup(a => a.Execute(It.IsAny <Func <ExecuteMultipleResponse> >()))
            .Returns(requestResult);
            ManyToManyDetails details = new ManyToManyDetails
            {
                Entity1IntersectAttribute = "contactid",
                Entity2IntersectAttribute = "accountid",
                IsManyToMany = true,
                SchemaName   = "accountcontact"
            };

            MockEntityMetadataCache.Setup(a => a.GetManyToManyEntityDetails(It.IsAny <string>()))
            .Returns(details);

            FluentActions.Invoking(() => systemUnderTest.AssociateManyToManyEntity(entities))
            .Should()
            .NotThrow();

            MockRetryExecutor.VerifyAll();
            MockEntityMetadataCache.VerifyAll();
        }