Utility method in test case.