I am not able to mock StreamBridge in my Unit Tests.
@MockBean
private StreamBridge bridge;
I get an IllegalStateException due to:
Caused by: org.mockito.exceptions.base.MockitoException: Cannot mock/spy class org.springframework.cloud.stream.function.StreamBridge Mockito cannot mock/spy because :
- final class at org.springframework.boot.test.mock.mockito.MockDefinition.createMock(MockDefinition.java:154)