public void InternalHasValidationResult_CustomIdentifier_Successfully() { // Arrange var resource = CreateResource("https://pid.bayer.com/custom-valid-identifer"); var pidUriTemplateFlattened = new PidUriTemplateFlattenedBuilder().GenerateSampleData().Build(); SetupPidUriTemplateService(new List <PidUriTemplateFlattened>() { pidUriTemplateFlattened }); SetupPidUriGenerationService(); EntityValidationFacade validationFacade = new EntityValidationFacade(ResourceCrudAction.Create, resource, null, null, _metadata, null); // Act _validator.HasValidationResult(validationFacade, GetPidUriProperty(resource)); // Assert Assert.Contains(Graph.Metadata.Constants.EnterpriseCore.PidUri, validationFacade.RequestResource.Properties); Assert.Equal(0, validationFacade.ValidationResults.Count); Entity pidUri = validationFacade.RequestResource.Properties.SingleOrDefault(p => p.Key == Graph.Metadata.Constants.EnterpriseCore.PidUri).Value[0]; Assert.Equal("https://pid.bayer.com/custom-valid-identifer", pidUri.Id); Assert.DoesNotContain(Graph.Metadata.Constants.Identifier.HasUriTemplate, pidUri.Properties); }