use of org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.GetQueueStatisticsFromGivenPortOutput in project openflowplugin by opendaylight.
the class OpendaylightQueueStatisticsServiceImplTest method testGetQueueStatisticsFromGivenPort.
@Test
public void testGetQueueStatisticsFromGivenPort() throws Exception {
Mockito.doAnswer(answerVoidToCallback).when(outboundQueueProvider).commitEntry(Matchers.eq(42L), requestInput.capture(), Matchers.any(FutureCallback.class));
GetQueueStatisticsFromGivenPortInputBuilder input = new GetQueueStatisticsFromGivenPortInputBuilder().setNode(createNodeRef("unitProt:123")).setNodeConnectorId(new NodeConnectorId("unitProt:123:321")).setQueueId(new QueueId(21L));
rpcResult = buildQueueStatsReply();
final Future<RpcResult<GetQueueStatisticsFromGivenPortOutput>> resultFuture = queueStatisticsService.getQueueStatisticsFromGivenPort(input.build());
Assert.assertTrue(resultFuture.isDone());
final RpcResult<GetQueueStatisticsFromGivenPortOutput> rpcResult = resultFuture.get();
Assert.assertTrue(rpcResult.isSuccessful());
Assert.assertEquals(MultipartType.OFPMPQUEUE, requestInput.getValue().getType());
}
Aggregations