2 * Copyright (c) 2019 Nordix Foundation. 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.remote.rpc.messages;
10 import static org.junit.Assert.assertEquals;
12 import org.apache.commons.lang.SerializationUtils;
13 import org.junit.Test;
14 import org.opendaylight.controller.remote.rpc.AbstractOpsTest;
16 public class ExecuteOpsTest {
19 public void testOpsSerialization() {
20 ExecuteRpc expected = ExecuteRpc.from(AbstractOpsTest.TEST_RPC_ID,
21 AbstractOpsTest.makeRPCInput("serialization-test"));
23 ExecuteRpc actual = (ExecuteRpc) SerializationUtils.clone(expected);
25 assertEquals("getName", expected.getType(), actual.getType());
26 assertEquals("getInputNormalizedNode", expected.getInput(), actual.getInput());
27 assertEquals("getPath", expected.getType(), actual.getType());