Helper functions for Go testing