use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupDescStatsReply in project openflowplugin by opendaylight.
the class MultipartReplyTranslatorTest method testTranslateGroupDesc.
@Test
public void testTranslateGroupDesc() {
DeviceContext mockedDeviceContext = mock(DeviceContext.class);
MultipartReplyMessage multipartReplyMessage = prepareMocks(mockedDeviceContext, prepareMultipartReplyGroupDesc(), MultipartType.OFPMPGROUPDESC);
DataContainer result = MultipartReplyTranslatorUtil.translate(multipartReplyMessage, mockedDeviceContext.getDeviceInfo(), CONVERTOR_MANAGER, mockedDeviceContext.oook()).get();
DataContainer dataObject = validateOutput(result);
assertTrue(dataObject instanceof GroupDescStatsReply);
GroupDescStatsReply groupStatistics = (GroupDescStatsReply) dataObject;
List<GroupDescStats> groupDescStats = groupStatistics.getGroupDescStats();
assertEquals(1, groupDescStats.size());
GroupDescStats groupDescStat = groupDescStats.get(0);
assertEquals(DUMMY_GROUP_ID.getValue(), groupDescStat.getGroupId().getValue());
assertEquals(DUMMY_GROUPS_TYPE, groupDescStat.getGroupType());
}
Aggregations