Refactor postMonitor tests