test case util functions