[Unittest] Add unit test for shortcycling.