adding Sample Test code for how to gracefully stop suspend and resume thread