Class MockIntegration
java.lang.Object
org.springframework.integration.test.mock.MockIntegration
The factory for integration specific mock components.
- Since:
- 5.0
- Author:
- Artem Bilan
- 
Method SummaryModifier and TypeMethodDescriptionstatic org.mockito.ArgumentCaptor<Message<?>>static MockMessageHandlerBuild aMockMessageHandlerinstance.static MockMessageHandlermockMessageHandler(org.mockito.ArgumentCaptor<Message<?>> messageArgumentCaptor) Build aMockMessageHandlerinstance based on the providedArgumentCaptor.static MessageSource<?>mockMessageSource(Message<?> message) Build a mock for theMessageSourcebased on the provided message.static MessageSource<?>mockMessageSource(Message<?> message, Message<?>... messages) Build a mock for theMessageSourcebased on the provided messages.static <T> MessageSource<T>mockMessageSource(T payload) Build a mock for theMessageSourcebased on the provided payload.static <T> MessageSource<T>mockMessageSource(T payload, T... payloads) Build a mock for theMessageSourcebased on the provided payloads.
- 
Method Details- 
mockMessageSourceBuild a mock for theMessageSourcebased on the provided payload. The returned instance is ordinary Mockito mock that is capable of recording interactions with it and further verification.- Type Parameters:
- T- the payload type
- Parameters:
- payload- the payload to return by mocked- MessageSource
- Returns:
- the mocked MessageSource
- See Also:
- 
- Mockito.mock(Class)
 
 
- 
mockMessageSourceBuild a mock for theMessageSourcebased on the provided payloads. The returned instance is ordinary Mockito mock that is capable of recording interactions with it and further verification.- Type Parameters:
- T- the payload type
- Parameters:
- payload- the first payload to return by mocked- MessageSource
- payloads- the next payloads to return by mocked- MessageSource
- Returns:
- the mocked MessageSource
- See Also:
- 
- Mockito.mock(Class)
 
 
- 
mockMessageSourceBuild a mock for theMessageSourcebased on the provided message. The returned instance is ordinary Mockito mock that is capable of recording interactions with it and further verification.- Parameters:
- message- the message to return by mocked- MessageSource
- Returns:
- the mocked MessageSource
- See Also:
- 
- Mockito.mock(Class)
 
 
- 
mockMessageSourceBuild a mock for theMessageSourcebased on the provided messages. The returned instance is ordinary Mockito mock that is capable of recording interactions with it and further verification.- Parameters:
- message- the first message to return by mocked- MessageSource
- messages- the next messages to return by mocked- MessageSource
- Returns:
- the mocked MessageSource
- See Also:
- 
- Mockito.mock(Class)
 
 
- 
mockMessageHandlerBuild aMockMessageHandlerinstance.- Returns:
- the MockMessageHandlerinstance ready for interaction
 
- 
mockMessageHandlerpublic static MockMessageHandler mockMessageHandler(org.mockito.ArgumentCaptor<Message<?>> messageArgumentCaptor) Build aMockMessageHandlerinstance based on the providedArgumentCaptor.- Parameters:
- messageArgumentCaptor- the Mockito ArgumentCaptor to capture incoming messages
- Returns:
- the MockMessageHandler instance ready for interaction
 
- 
messageArgumentCaptor
 
-