use of com.yahoo.config.model.api.SuperModelProvider in project vespa by vespa-engine.
the class InstanceValidatorTest method mockSuperModelProvider.
private SuperModelProvider mockSuperModelProvider(ApplicationInfo... appInfos) {
SuperModel superModel = new SuperModel(Stream.of(appInfos).collect(Collectors.groupingBy(appInfo -> appInfo.getApplicationId().tenant(), Collectors.toMap(ApplicationInfo::getApplicationId, Function.identity()))));
SuperModelProvider superModelProvider = mock(SuperModelProvider.class);
when(superModelProvider.getSuperModel()).thenReturn(superModel);
return superModelProvider;
}
Aggregations