use of org.zalando.nakadi.metrics.EventTypeMetricRegistry in project nakadi by zalando.
the class EventPublishingControllerTest method setUp.
@Before
public void setUp() {
metricRegistry = new MetricRegistry();
publisher = mock(EventPublisher.class);
eventTypeMetricRegistry = new EventTypeMetricRegistry(metricRegistry);
kpiPublisher = mock(NakadiKpiPublisher.class);
settings = mock(SecuritySettings.class);
when(settings.getAuthMode()).thenReturn(OFF);
when(settings.getAdminClientId()).thenReturn("nakadi");
blacklistService = Mockito.mock(BlacklistService.class);
when(blacklistService.isProductionBlocked(any(), any())).thenReturn(false);
final FeatureToggleService featureToggleService = Mockito.mock(FeatureToggleService.class);
final EventPublishingController controller = new EventPublishingController(publisher, eventTypeMetricRegistry, blacklistService, kpiPublisher, "kpiEventTypeName");
mockMvc = standaloneSetup(controller).setMessageConverters(new StringHttpMessageConverter(), TestUtils.JACKSON_2_HTTP_MESSAGE_CONVERTER).setCustomArgumentResolvers(new ClientResolver(settings, featureToggleService)).build();
}
Aggregations