Refactore the timedWait into a utils class

Also modified it to take an optional TimeUnit, defaulting currently to
SECONDS.

I couldn't get the tests to execute where I'm at, maybe a side effect of
the wifi network I'm on :|