package Ġnet . cord a . core . identity Ċ Ċ import Ġnet . cord a . core . internal . is Equivalent To Ċ import Ġorg . junit . Test Ċ import Ġjavax . security . auth . x 5 0 0 . X 5 0 0 Principal Ċ import Ġkotlin . test . assertTrue Ċ Ċ class ĠX 5 0 0 UtilsTest Ġ{ ĊĊĠĠĠ Ġ@ Test ( timeout = 3 0 0 _ 0 0 0 ) Ċ ĉ fun Ġ` X 5 0 0 Principal Ġequal X 5 0 0 Name Parts Ġmatches Ġregardless Ġthe Ġorder `() Ġ{ ĊĠĠĠĠĠĠĠ Ġ// Ġgiven ĊĠĠĠĠĠĠĠ Ġval Ġordering A Ġ= Ġ" O = Bank ĠA , ĠO U = Organ isation ĠUnit , ĠL = New ĠYork , ĠC = US " ĊĠĠĠĠĠĠĠ Ġval Ġordering B Ġ= Ġ" OU = Organ isation ĠUnit , ĠO = Bank ĠA , ĠL = New ĠYork , ĠC = US " ĊĠĠĠĠĠĠĠ Ġval Ġordering C Ġ= Ġ" L = New ĠYork , ĠO = Bank ĠA , ĠC = US , ĠO U = Organ isation ĠUnit " ĊĊĠĠĠĠĠĠĠ Ġ// Ġwhen ĊĠĠĠĠĠĠĠ Ġval Ġprincipal A Ġ= ĠX 5 0 0 Principal ( ordering A ) ĊĠĠĠĠĠĠĠ Ġval Ġprincipal B Ġ= ĠX 5 0 0 Principal ( ordering B ) ĊĠĠĠĠĠĠĠ Ġval Ġprincipal C Ġ= ĠX 5 0 0 Principal ( ordering C ) ĊĊĠĠĠĠĠĠĠ Ġ// Ġthen ĊĠĠĠĠĠĠĠ ĠassertTrue Ġ{ Ġprincipal A . is Equivalent To ( principal B ) Ġ} ĊĠĠĠĠĠĠĠ ĠassertTrue Ġ{ Ġprincipal B . is Equivalent To ( principal C ) Ġ} ĊĠĠĠ Ġ} Ċ } Ċ