Update test case to be more robust.