2 * Copyright (c) 2017 Pantheon Technologies s.r.o. 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
8 package org.opendaylight.controller.cluster.datastore.persisted;
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;
15 public abstract class AbstractIdentifiablePayloadTest<T extends AbstractIdentifiablePayload<?>> extends AbstractTest {
20 public void testSerialization() {
21 final T object = object();
22 final T cloned = SerializationUtils.clone(object);
23 Assert.assertEquals(object.getIdentifier(), cloned.getIdentifier());