Unit tests for AbstractRequestProxy derived classes
[controller.git] / opendaylight / md-sal / cds-access-api / src / test / java / org / opendaylight / controller / cluster / access / commands / ModifyTransactionRequestProxyV1EmptyModificationsTest.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.access.commands;
9
10 import com.google.common.collect.Lists;
11 import org.junit.Assert;
12 import org.junit.Test;
13 import org.opendaylight.controller.cluster.access.concepts.AbstractRequestProxyTest;
14 import org.opendaylight.controller.cluster.access.concepts.Request;
15
16 public class ModifyTransactionRequestProxyV1EmptyModificationsTest
17         extends AbstractRequestProxyTest<ModifyTransactionRequestProxyV1> {
18     private static final PersistenceProtocol PROTOCOL = PersistenceProtocol.ABORT;
19     private static final ModifyTransactionRequest REQUEST = new ModifyTransactionRequest(
20             TRANSACTION_IDENTIFIER, 0, ACTOR_REF, Lists.newArrayList(), PROTOCOL);
21     private static final ModifyTransactionRequestProxyV1 OBJECT = new ModifyTransactionRequestProxyV1(REQUEST);
22
23     @Override
24     public ModifyTransactionRequestProxyV1 object() {
25         return OBJECT;
26     }
27
28     @Test
29     public void createRequestTest() {
30         final Request request = object().createRequest(TRANSACTION_IDENTIFIER, 0, ACTOR_REF);
31         Assert.assertNotNull(request);
32     }
33 }