Helper methods for unit testing in Go