[Event view] Change the place of functions and rename testPatternOfEachMiddleware() to testTableContets().