Added test helper function