add test code for pause and resume