Isn't the example org.apache.flink.streaming.runtime.operators.windowing.WindowOperatorTest
documented in offcial flink very complicated? Althought it's very comprehensive and covers most of the cases, this test aims to provide simple and direct example so you get the point spending less time!
Run the project in IDE and execute unit tests, including:
- TransactionMapperTest
demonstrates how to test
stateful
UDF.
For more information, please check
https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/testing.html#unit-testing-stateful-or-timely-udfs--custom-operators
to see required dependencies. You can also check pom.xml
of this project.
- StringToAuthorizationTest shows how to test
stateless
UDF