}
@Test(dataProvider="expandDataTest")
public void testExpandData(Map<String, List<Map<String, String>>> expandedData,
long startTime, long endTime, Long[] expectedTimes) throws Exception {
final FeedProvider fp = Mockito.mock(FeedProvider.class);
final String feedId = "feedId";
Mockito.when(fp.getSubscriptionId()).thenReturn(feedId);
PlotViewManifestation manifestation = new PlotViewManifestation(mockComponent,new ViewInfo(PlotViewManifestation.class,"",ViewType.OBJECT)) {
private static final long serialVersionUID = 1L;
@Override
public Collection<FeedProvider> getVisibleFeedProviders() {
return Collections.singleton(fp);
}
@Override
public long getCurrentMCTTime() {
return 7L;
}
};
Mockito.when(fp.getTimeService()).thenReturn(timeService);
Method m = PlotViewManifestation.class.getDeclaredMethod("expandData", Map.class, Long.TYPE, Long.TYPE);
m.setAccessible(true);
m.invoke(manifestation, expandedData,startTime, endTime);
List<Map<String, String>> values = expandedData.get(feedId);