Correct Time comparison in tests

Correcting problem found by findbugs