Remove use of {String,UUID}Identifier
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / datastore / identifiers / ChainedTransactionIdentifierTest.java
index 77e5ea75994429d8d3b582392a97efb4ecb43a87..64f04add99592c3c6fd24029b6adfa75c6be2646 100644 (file)
@@ -8,15 +8,17 @@
 
 package org.opendaylight.controller.cluster.datastore.identifiers;
 
-import static org.junit.Assert.assertEquals;
+import static org.hamcrest.CoreMatchers.startsWith;
+import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import org.junit.Test;
+import org.opendaylight.controller.cluster.access.concepts.MemberName;
 
 public class ChainedTransactionIdentifierTest {
 
     @Test
     public void testToString(){
-        TransactionChainIdentifier chainId = new TransactionChainIdentifier("member-1", 99);
+        TransactionChainIdentifier chainId = new TransactionChainIdentifier(MemberName.forName("member-1"), 99);
         ChainedTransactionIdentifier chainedTransactionIdentifier = new ChainedTransactionIdentifier(chainId, 100);
 
         String txnId = chainedTransactionIdentifier.toString();
@@ -25,7 +27,7 @@ public class ChainedTransactionIdentifierTest {
         assertTrue(txnId.contains("100"));
         assertTrue(txnId.contains("99"));
 
-        assertEquals("member-1-chn-99-txn-100", txnId);
+        assertThat(txnId, startsWith("member-1-chn-99-txn-100-"));
     }
 
 }
\ No newline at end of file