Update test case to be more robusted.