Source:
<code>public void init() throws Exception { final NakadiSettings nakadiSettings = new NakadiSettings(0, 0, 0, TOPIC_RETENTION_TIME_MS, 0, 60, <START> NAKADI_POLL_TIMEOUT, NAKADI_SEND_TIMEOUT, 0, NAKADI_EVENT_MAX_BYTES, 0); <END> final PartitionsCalculator partitionsCalculator = new KafkaConfig().createPartitionsCalculator( "t2.large", objectMapper, nakadiSettings); final EventTypeService eventTypeService = new EventTypeService(eventTypeRepository, topicRepository, partitionResolver, enrichment, subscriptionRepository, schemaEvolutionService, partitionsCalculator, featureToggleService, timelineSync, nakadiSettings); final EventTypeOptionsValidator eventTypeOptionsValidator = new EventTypeOptionsValidator(TOPIC_RETENTION_MIN_MS, TOPIC_RETENTION_MAX_MS); final EventTypeController controller = new EventTypeController(eventTypeService, featureToggleService, eventTypeOptionsValidator, applicationService, nakadiSettings); doReturn(randomUUID).when(uuid).randomUUID(); final MappingJackson2HttpMessageConverter jackson2HttpMessageConverter = new MappingJackson2HttpMessageConverter(objectMapper); doReturn(true).when(applicationService).exists(any()); doReturn(SecuritySettings.AuthMode.OFF).when(settings).getAuthMode(); doReturn("nakadi").when(settings).getAdminClientId(); doReturn(true).when(featureToggleService).isFeatureEnabled(CHECK_PARTITIONS_KEYS); mockMvc = standaloneSetup(controller) .setMessageConverters(new StringHttpMessageConverter(), jackson2HttpMessageConverter) .setCustomArgumentResolvers(new ClientResolver(settings, featureToggleService)) .build(); }</code><technical_language>magic :)</technical_language>

Target:
public void init() throws Exception { final NakadiSettings nakadiSettings = new NakadiSettings(0, 0, 0, TOPIC_RETENTION_TIME_MS, 0, 60, NAKADI_POLL_TIMEOUT, NAKADI_SEND_TIMEOUT, 0, NAKADI_EVENT_MAX_BYTES, NAKADI_SUBSCRIPTION_MAX_PARTITIONS); final PartitionsCalculator partitionsCalculator = new KafkaConfig().createPartitionsCalculator( "t2.large", objectMapper, nakadiSettings); final EventTypeService eventTypeService = new EventTypeService(eventTypeRepository, topicRepository, partitionResolver, enrichment, subscriptionRepository, schemaEvolutionService, partitionsCalculator, featureToggleService, timelineSync, nakadiSettings); final EventTypeOptionsValidator eventTypeOptionsValidator = new EventTypeOptionsValidator(TOPIC_RETENTION_MIN_MS, TOPIC_RETENTION_MAX_MS); final EventTypeController controller = new EventTypeController(eventTypeService, featureToggleService, eventTypeOptionsValidator, applicationService, nakadiSettings); doReturn(randomUUID).when(uuid).randomUUID(); final MappingJackson2HttpMessageConverter jackson2HttpMessageConverter = new MappingJackson2HttpMessageConverter(objectMapper); doReturn(true).when(applicationService).exists(any()); doReturn(SecuritySettings.AuthMode.OFF).when(settings).getAuthMode(); doReturn("nakadi").when(settings).getAdminClientId(); doReturn(true).when(featureToggleService).isFeatureEnabled(CHECK_PARTITIONS_KEYS); mockMvc = standaloneSetup(controller) .setMessageConverters(new StringHttpMessageConverter(), jackson2HttpMessageConverter) .setCustomArgumentResolvers(new ClientResolver(settings, featureToggleService)) .build(); }