use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.monitor.rev171207.peers.peer.Stats in project lispflowmapping by opendaylight.
the class LispSouthboundRpcTest method getStatsTest.
/**
* Tests {@link LispSouthboundRPC#getStats} method.
*/
@Test
public void getStatsTest() throws ExecutionException, InterruptedException {
final ConcurrentLispSouthboundStats stats = new ConcurrentLispSouthboundStats();
incrementAll(stats);
Mockito.when(lispSouthboundPlugin.getStats()).thenReturn(stats);
// result
final ControlMessageStats resultStats = lispSouthboundRPC.getStats().get().getResult().getControlMessageStats();
assertEquals(stats.getRx()[0], (long) resultStats.getControlMessage().get(0).getRxCount());
assertEquals(stats.getRx()[1], (long) resultStats.getControlMessage().get(1).getRxCount());
assertEquals(stats.getRx()[2], (long) resultStats.getControlMessage().get(2).getRxCount());
assertEquals(stats.getRx()[3], (long) resultStats.getControlMessage().get(3).getRxCount());
assertEquals(stats.getRx()[4], (long) resultStats.getControlMessage().get(4).getRxCount());
assertEquals(stats.getRx()[6], (long) resultStats.getControlMessage().get(5).getRxCount());
assertEquals(stats.getRx()[7], (long) resultStats.getControlMessage().get(6).getRxCount());
assertEquals(stats.getRx()[8], (long) resultStats.getControlMessage().get(7).getRxCount());
}
Aggregations