Predictable order of threads.

Test fail on openjdk8.