2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.cluster.datastore.identifiers;
11 import static org.junit.Assert.assertEquals;
12 import static org.junit.Assert.assertTrue;
13 import org.junit.Test;
15 public class ChainedTransactionIdentifierTest {
18 public void testToString(){
19 TransactionChainIdentifier chainId = new TransactionChainIdentifier("member-1", 99);
20 ChainedTransactionIdentifier chainedTransactionIdentifier = new ChainedTransactionIdentifier(chainId, 100);
22 String txnId = chainedTransactionIdentifier.toString();
24 assertTrue(txnId.contains("member-1"));
25 assertTrue(txnId.contains("100"));
26 assertTrue(txnId.contains("99"));
28 assertEquals("member-1-chn-99-txn-100", txnId);