I am writing test case of following method
class BeanDefinitions {
public Customizer<ReactiveResilience4JCircuitBreakerFactory> apiEnrichmentLayerCircuitBreakerCustomizer(
final HttpClientConfigurationProperties clientsConfig
) {
return CircuitBreakerCustomizers.fromHttpClientConfig(
API_ENRICHMENT_LAYER_CLIENT_ID,
clientsConfig.getHttpClients().get(API_ENRICHMENT_LAYER_CLIENT_ID)
);
}
}
I want to mock the static method (CircuitBreakerCustomizers.fromHttpClientConfig) which is called in that class.(dont want to run that static method but when that static.method call then return something)
Assertions.assertNotNull(beanDefinitions.apiEnrichmentLayerCircuitBreakerCustomizer(clientsConfig));
I always get NPE as static method is performing some task which i don't want to execute.
Is there any possibility in mockito to achieve the same i.e mock inner static method?