In the DirectRunner, the assert_that transform does not work in all cases for streaming execution, especially in the user state and timers tests, so a workaround is used in this case. We should fix this.
Imported from Jira BEAM-5295. Original Jira may contain additional context.
Reported by: ccy.