create util method in tests