use of com.sequenceiq.cloudbreak.cmtemplate.configproviders.schemaregistry.SchemaRegistryRoles.SCHEMA_REGISTRY_SERVER in project cloudbreak by hortonworks.
the class SchemaRegistryJarStorageConfigProviderTest method getTemplatePreparationObject.
private TemplatePreparationObject getTemplatePreparationObject(Integer... instanceCountsForSchemaRegistryHostGroups) {
List<HostgroupView> srHostGroups = Arrays.stream(instanceCountsForSchemaRegistryHostGroups).map(nodeCnt -> new HostgroupView(null, 0, InstanceGroupType.CORE, nodeCnt)).collect(toList());
TemplatePreparationObject tpo = mock(TemplatePreparationObject.class, withSettings().lenient());
when(tpo.getHostGroupsWithComponent(SCHEMA_REGISTRY_SERVER)).thenAnswer(__ -> srHostGroups.stream());
when(tpo.getBlueprintView()).thenReturn(blueprintView);
return tpo;
}
Aggregations