Updated test to be more robust.