added context manager to mock queue