This test may fail sometimes. Find a more robust way to test it.