Source:
public void ruleSnomedCommon3() throws Exception { final String ruleId = "snomed-common-3"; indexRule(ruleId); SnomedRelationshipIndexEntry relationshipWithDefiningCharType = relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.DEFINING_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithDefiningCharType); SnomedRelationshipIndexEntry relationshipWithQualifingCharType = relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.QUALIFYING_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithQualifingCharType); SnomedRelationshipIndexEntry relationshipWithStatedCharType= relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.STATED_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithStatedCharType); SnomedRelationshipIndexEntry relationshipWithInferredCharType= relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.INFERRED_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithInferredCharType); SnomedRelationshipIndexEntry relationshipWithAdditionalCharType= relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.ADDITIONAL_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithAdditionalCharType); ValidationIssues issues = validate(ruleId); assertAffectedComponents(issues, ComponentIdentifier.of(SnomedTerminologyComponentConstants.RELATIONSHIP_NUMBER, relationshipWithDefiningCharType.getId()), ComponentIdentifier.of(SnomedTerminologyComponentConstants.RELATIONSHIP_NUMBER, relationshipWithQualifingCharType.getId()) ); }

Target:
public void ruleSnomedCommon3() throws Exception { final String ruleId = "snomed-common-3"; indexRule(ruleId); SnomedRelationshipIndexEntry relationshipWithDefiningCharType = relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.DEFINING_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithDefiningCharType); SnomedRelationshipIndexEntry relationshipWithQualifingCharType = relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.QUALIFYING_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithQualifingCharType); SnomedRelationshipIndexEntry relationshipWithStatedCharType = relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.STATED_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithStatedCharType); SnomedRelationshipIndexEntry relationshipWithInferredCharType = relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.INFERRED_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithInferredCharType); SnomedRelationshipIndexEntry relationshipWithAdditionalCharType = relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.ADDITIONAL_RELATIONSHIP) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithAdditionalCharType); SnomedRelationshipIndexEntry relationshipWithCharTypeOutsideOfCharTypeHierarchy = relationship(generateConceptId(), Concepts.IS_A, generateConceptId()) .characteristicTypeId(Concepts.ROOT_CONCEPT) .build(); indexRevision(MAIN, nextStorageKey(), relationshipWithCharTypeOutsideOfCharTypeHierarchy); ValidationIssues issues = validate(ruleId); assertAffectedComponents(issues, ComponentIdentifier.of(SnomedTerminologyComponentConstants.RELATIONSHIP_NUMBER, relationshipWithDefiningCharType.getId()), ComponentIdentifier.of(SnomedTerminologyComponentConstants.RELATIONSHIP_NUMBER, relationshipWithQualifingCharType.getId()) ); }