Modified tests to be more robust (esp. on OpenJDK6)

Unfortunately, time measurements are somewhat random
and cannot be predicted very well. The tests could still
fail randomly if some very unusual runtimes occur.