use of com.b2international.snowowl.core.request.CommitResult in project snow-owl by b2ihealthcare.
the class SnomedRefSetMemberApiTest method testDuplicateIdCreationShouldFail.
@Test(expected = AlreadyExistsException.class)
public void testDuplicateIdCreationShouldFail() {
final String simpleRefSetId = createNewRefSet(branchPath);
final String memberId = UUID.randomUUID().toString();
final CommitResult result1 = SnomedRequests.prepareNewMember().setId(memberId).setModuleId(Concepts.MODULE_SCT_CORE).setRefsetId(simpleRefSetId).setReferencedComponentId(simpleRefSetId).build(branchPath.getPath(), RestExtensions.USER, "Creating refset member").execute(getBus()).getSync();
final String member1Id = result1.getResultAs(String.class);
assertEquals(memberId, member1Id);
final CommitResult result2 = SnomedRequests.prepareNewMember().setId(memberId).setModuleId(Concepts.MODULE_SCT_CORE).setRefsetId(simpleRefSetId).setReferencedComponentId(simpleRefSetId).build(branchPath.getPath(), RestExtensions.USER, "Creating refset member").execute(getBus()).getSync();
}
Aggregations