for (int r = 0 ; r < rows ; r++) {
result[r] = new AbstractComponent[cols];
for (int c = 0 ; c < cols ; c++) {
FeedProvider fp = Mockito.mock(FeedProvider.class);
TimeService ts = Mockito.mock(TimeService.class);
AbstractComponent ac = Mockito.mock(AbstractComponent.class);
Mockito.when(ac.isLeaf()).thenReturn(true);
Mockito.when(ac.getCapability(FeedProvider.class)).thenReturn(fp);
Mockito.when(fp.getTimeService()).thenReturn(ts);
Mockito.when(fp.isPrediction()).thenReturn(false);
Mockito.when(ts.getTimeSystems()).thenReturn(multiTS ? timeSystems : new String[]{timeSystems[r]});
Mockito.when(ts.getTimeFormats()).thenReturn(multiTF ? timeFormats : new String[]{timeFormats[c]});
result[r][c] = ac;
}
}
return result;