There is a test method sleepSeconds(1)

And there also is another method: asserTrueEventually(new AssertTask(){
    void run(){
    for (int i = 0; i < size; i++) {
             map.put(i, i, 1, TimeUnit.SECONDS);
         }
    }
});

This makes your test less sensitive to timing issues. You can also pass in a custom timeout, e.g. 5 seconds.. 1 seconds is very short. Especially on a virtualized environment like our build system.