Test IsFlush
Refactored Test helper functions