Change the current behavior of the DataSet component such that the expected message count defaults to zero for DataSets used as a source (i.e. DataSetConsumers).
The reasoning behind this is as follows.
I use the DataSet component for simple load testing. When I use a DataSet as a source (i.e. from(“dataset://my-dataset”) ), the assertMockEndpointsSatisfied() always fails because the expectedMessageSize is set to the size of the DataSet. I either have to explicitly set the expected message count on the endpoint to zero ( getMockEndpoint( “dataset://my-dataset”).expectedMessageCount( 0 ), or I have to assert all of the other mock endpoints individually (i.e not use assertMockEndpointsSatisfied() ).
I rarely use the same dataset as both a source (i.e. from(“dataset://…”) ) and a target (i.e. to( “dataset://…”) ), so this behavior doesn’t make much sense to me. Additionally, I can’t use the same DataSet as the source and target when the source message count would be different than the target message count - which would be the case for a route that does some simple filtering, and all I want to assert is the correct number of messages came through.