File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/test/java/io/aiven/kafka/connect/transforms Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,24 @@ void shouldFilterOutKeyRecordsNotEqualsToId() {
138
138
.isEqualTo (record );
139
139
}
140
140
141
+ @ Test
142
+ void shouldFilterOutRecordNotEqualsToIntId () {
143
+ final FilterByFieldValue <SourceRecord > filter = new FilterByFieldValue .Value <>();
144
+ filter .configure (Map .of (
145
+ "field.name" , "EventId" ,
146
+ "field.value" , "4690" ,
147
+ "field.value.matches" , "true"
148
+ ));
149
+
150
+ assertThat (filter .apply (prepareRecord (() -> "A42" , () -> Map .of ("EventId" , 4663 ))))
151
+ .as ("Record with id not equal to 'A132' should be filtered out" )
152
+ .isNull ();
153
+ final SourceRecord record = prepareRecord (() -> "A42" , () -> Map .of ("EventId" , 4690 ));
154
+ assertThat (filter .apply (record ))
155
+ .as ("Record with id equal to '4690' should not be filtered out" )
156
+ .isEqualTo (record );
157
+ }
158
+
141
159
@ Test
142
160
void shouldFilterOutMapValueRecordsWithRegex () {
143
161
final FilterByFieldValue <SourceRecord > filterByFieldValue = new FilterByFieldValue .Value <>();
You can’t perform that action at this time.
0 commit comments