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
diff --git a/opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/ModifyTransactionRequestProxyV1EmptyModificationsTest.java b/opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/ModifyTransactionRequestProxyV1EmptyModificationsTest.java
new file mode 100644 (file)
index 0000000..1a85d22
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2017 Pantheon Technologies s.r.o. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.cluster.access.commands;
+
+import com.google.common.collect.Lists;
+import org.junit.Assert;
+import org.junit.Test;
+import org.opendaylight.controller.cluster.access.concepts.AbstractRequestProxyTest;
+import org.opendaylight.controller.cluster.access.concepts.Request;
+
+public class ModifyTransactionRequestProxyV1EmptyModificationsTest
+        extends AbstractRequestProxyTest<ModifyTransactionRequestProxyV1> {
+    private static final PersistenceProtocol PROTOCOL = PersistenceProtocol.ABORT;
+    private static final ModifyTransactionRequest REQUEST = new ModifyTransactionRequest(
+            TRANSACTION_IDENTIFIER, 0, ACTOR_REF, Lists.newArrayList(), PROTOCOL);
+    private static final ModifyTransactionRequestProxyV1 OBJECT = new ModifyTransactionRequestProxyV1(REQUEST);
+
+    @Override
+    public ModifyTransactionRequestProxyV1 object() {
+        return OBJECT;
+    }
+
+    @Test
+    public void createRequestTest() {
+        final Request request = object().createRequest(TRANSACTION_IDENTIFIER, 0, ACTOR_REF);
+        Assert.assertNotNull(request);
+    }
+}
\ No newline at end of file