Add unit test to support timeout refactor.