add a useful test utility function