There are some harness tests which can be used to test your function. It is also a common way to test function or operator in flink internal tests. Currently, the harness classes mainly include:
You can take a look at the source code of these classes.
To be more specific, you can take a look at the testSlidingEventTimeWindowsApply, in which the RichSumReducer window function has been tested.