Add more serialization assertions
[controller.git] / opendaylight / md-sal / cds-access-api / src / test / java / org / opendaylight / controller / cluster / access / concepts / TransactionIdentifierTest.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.cluster.access.concepts;
9
10 public class TransactionIdentifierTest extends AbstractIdentifierTest<TransactionIdentifier> {
11     private static final FrontendIdentifier FRONTEND =
12             new FrontendIdentifier(MemberName.forName("test"), FrontendIdentifierTest.ONE_FRONTEND_TYPE);
13     private static final ClientIdentifier CLIENT = new ClientIdentifier(FRONTEND, 0);
14     private static final LocalHistoryIdentifier HISTORY = new LocalHistoryIdentifier(CLIENT, 0);
15
16     private static final TransactionIdentifier OBJECT = new TransactionIdentifier(HISTORY, 0);
17     private static final TransactionIdentifier DIFFERENT_OBJECT = new TransactionIdentifier(HISTORY, 1);
18     private static final TransactionIdentifier EQUAL_OBJECT = new TransactionIdentifier(HISTORY, 0);
19
20     @Override
21     TransactionIdentifier object() {
22         return OBJECT;
23     }
24
25     @Override
26     TransactionIdentifier differentObject() {
27         return DIFFERENT_OBJECT;
28     }
29
30     @Override
31     TransactionIdentifier equalObject() {
32         return EQUAL_OBJECT;
33     }
34
35     @Override
36     int expectedSize() {
37         return 121;
38     }
39 }