Fixed unittest to not rely on the system clock and being speedy.