我无法在单元测试中模拟 StreamBridge。
@MockBean
private StreamBridge bridge;
Run Code Online (Sandbox Code Playgroud)
由于以下原因,我收到 IllegalStateException:
引起原因:org.mockito.exceptions.base.MockitoException:无法模拟/间谍类org.springframework.cloud.stream.function.StreamBridge Mockito无法模拟/间谍,因为: