Minor optimization for test cases.