use of org.projectfloodlight.openflow.protocol.OFTableStatsEntry in project open-kilda by telstra.
the class OfTableStatsMapperTest method shouldConvertSuccessfully.
@Test
public void shouldConvertSuccessfully() {
OFFactoryVer13 ofFactoryVer13 = new OFFactoryVer13();
OFTableStatsEntry entry = ofFactoryVer13.buildTableStatsEntry().setTableId(TableId.of(11)).setActiveCount(10).setMatchedCount(U64.of(100001L)).setLookupCount(U64.of(100002L)).build();
TableStatsEntry result = OfTableStatsMapper.INSTANCE.toTableStatsEntry(entry);
assertEquals(result.getTableId(), entry.getTableId().getValue());
assertEquals(result.getActiveEntries(), entry.getActiveCount());
assertEquals(result.getLookupCount(), entry.getLookupCount().getValue());
assertEquals(result.getMatchedCount(), entry.getMatchedCount().getValue());
}
Aggregations