use of com.att.aro.core.tracemetadata.impl.MetaDataHelper in project VideoOptimzer by attdevsupport.
the class PacketAnalyzerImplTest method Test_analyzeTraceDirectory_returnIsPacketAnalyzerResult.
@Test
public void Test_analyzeTraceDirectory_returnIsPacketAnalyzerResult() throws Exception {
iPacketAnalyzer.setEnergyModelFactory(energymodelfactory);
iPacketAnalyzer.setBurstCollectionAnalayzer(burstcollectionanalyzer);
iPacketAnalyzer.setRrcStateMachineFactory(statemachinefactory);
iPacketAnalyzer.setProfileFactory(profilefactory);
TraceDirectoryResult mockTraceDirResult = mock(TraceDirectoryResult.class);
MetaDataHelper metaDataHelper = mock(MetaDataHelper.class);
MetaDataModel metaDataModel = new MetaDataModel();
AnalysisFilter filter = mock(AnalysisFilter.class);
filter.setIpv4Sel(true);
filter.setIpv6Sel(true);
filter.setUdpSel(true);
CpuActivityList cpuList = new CpuActivityList();
cpuList.add(new CpuActivity());
when(mockTraceDirResult.getCpuActivityList()).thenReturn(cpuList);
when(tracereader.readTraceDirectory(any(String.class))).thenReturn(mockTraceDirResult);
when(metaDataHelper.initMetaData(any(PacketAnalyzerResult.class))).thenReturn(metaDataModel);
ProfileLTE profileLTE = new ProfileLTE();
when(profilefactory.createLTEdefault()).thenReturn(profileLTE);
PacketAnalyzerResult testResult = iPacketAnalyzer.analyzeTraceDirectory("", profileLTE, filter);
assertEquals(null, testResult.getSessionlist());
}
Aggregations