-/**
+/*
* Copyright (c) 2018 Redhat, Inc. 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.openflowplugin.extension.vendor.nicira.convertor.action;
import org.junit.Assert;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
import org.opendaylight.openflowplugin.extension.api.path.ActionPath;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionCtClear;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.aug.nx.action.ActionCtClear;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.ct.clear.grouping.NxActionCtClear;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nodes.node.table.flow.instructions.instruction.instruction.write.actions._case.write.actions.action.action.NxActionCtClearNodesNodeTableFlowWriteActionsCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.ct.clear.grouping.NxCtClear;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* Test for {@link CtClearConvertor}.
*/
@RunWith(MockitoJUnitRunner.class)
public class CtClearConvertorTest {
-
- private static final Logger LOG = LoggerFactory.getLogger(CtClearConvertorTest.class);
-
@Mock
private NxActionCtClearNodesNodeTableFlowWriteActionsCase actionsCase;
private CtClearConvertor ctClearConvertor;
@Before
- public void setUp() throws Exception {
+ public void setUp() {
final NxCtClear nxCtClear = Mockito.mock(NxCtClear.class);
final ActionCtClear actionCtClear = Mockito.mock(ActionCtClear.class);
}
@Test
- public void testConvert() throws Exception {
+ public void testConvert() {
final ActionCtClear actionCtClear = (ActionCtClear) ctClearConvertor.convert(actionsCase).getActionChoice();
Assert.assertNotNull(actionCtClear);
}
@Test
- public void testConvert1() throws Exception {
+ public void testConvert1() {
final org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action actionResult
= ctClearConvertor.convert(action, ActionPath.FLOWS_STATISTICS_UPDATE_APPLY_ACTIONS);
Assert.assertNotNull(actionResult);