Unit test for time_until_closure