use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.output.reg.grouping.NxOutputReg in project openflowplugin by opendaylight.
the class OutputRegConvertorTest method setUp.
@Before
public void setUp() throws Exception {
final NxOutputReg nxOutputReg = Mockito.mock(NxOutputReg.class);
final Src src = Mockito.mock(Src.class);
when(src.getOfsNbits()).thenReturn(1);
when(nxOutputReg.getSrc()).thenReturn(src);
when(nxOutputReg.getSrc().getSrcChoice()).thenReturn(Mockito.mock(SrcNxTunIdCase.class));
when(nxOutputReg.getMaxLen()).thenReturn(2);
when(actionsCase.getNxOutputReg()).thenReturn(nxOutputReg);
final ActionOutputReg actionOutputReg = Mockito.mock(ActionOutputReg.class);
final NxActionOutputReg nxActionOutputReg = Mockito.mock(NxActionOutputReg.class);
when(nxActionOutputReg.getSrc()).thenReturn(NiciraMatchCodecs.TUN_ID_CODEC.getHeaderWithoutHasMask().toLong());
when(nxActionOutputReg.getMaxLen()).thenReturn(3);
when(nxActionOutputReg.getNBits()).thenReturn(4);
when(actionOutputReg.getNxActionOutputReg()).thenReturn(nxActionOutputReg);
when(action.getActionChoice()).thenReturn(actionOutputReg);
outputRegConvertor = new OutputRegConvertor();
}
Aggregations