Add UnsignedLongBitmap
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / datastore / persisted / AbstractIdentifiablePayloadTest.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies s.r.o. 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.datastore.persisted;
9
10 import org.apache.commons.lang3.SerializationUtils;
11 import org.junit.Assert;
12 import org.junit.Test;
13 import org.opendaylight.controller.cluster.datastore.AbstractTest;
14
15 public abstract class AbstractIdentifiablePayloadTest<T extends AbstractIdentifiablePayload<?>> extends AbstractTest {
16
17     abstract T object();
18
19     @Test
20     public void testSerialization() {
21         final T object = object();
22         final T cloned = SerializationUtils.clone(object);
23         Assert.assertEquals(object.getIdentifier(), cloned.getIdentifier());
24     }
25 }