use of com.amazon.dataprepper.plugins.processor.aggregate.GroupState in project data-prepper by opensearch-project.
the class RemoveDuplicatesAggregateActionTest method handleEvent_with_non_empty_groupState_returns_expected_AggregateResponse_and_does_not_modify_groupState.
@Test
void handleEvent_with_non_empty_groupState_returns_expected_AggregateResponse_and_does_not_modify_groupState() {
removeDuplicatesAggregateAction = createObjectUnderTest();
final AggregateActionInput aggregateActionInput = new AggregateActionTestUtils.TestAggregateActionInput();
final GroupState groupState = aggregateActionInput.getGroupState();
groupState.put(RemoveDuplicatesAggregateAction.GROUP_STATE_HAS_EVENT, true);
final AggregateActionResponse aggregateActionResponse = removeDuplicatesAggregateAction.handleEvent(testEvent, aggregateActionInput);
assertThat(aggregateActionResponse.getEvent(), equalTo(null));
assertThat(groupState, equalTo(expectedGroupState));
}
Aggregations