+
+ def 'Checking caches for duplicated values when: #scenario.'() {
+ expect: 'duplicate checks works as intended'
+ assert objectUnderTest.isDuplicateId(cmHandleId, alternateId) == expectDuplicate
+ where: 'the following values are given'
+ scenario | cmHandleId | alternateId || expectDuplicate
+ 'new cm handle' | 'new ch-1' | 'alt-1' || false
+ 'cm handle with already assigned other alternate id' | 'cached cmhandle id' | 'alt-1' || true
+ 'alternate id already assigned to other cm handle' | 'ch-1' | 'cached alternate id' || true
+ 'no alternate id provided' | 'ch-1' | null || false
+ 'cm handle with already assigned same alternate id' | 'ch-1' | 'alt-1' || false
+ }