I have the following function which adds given number of hours in current time and returns new time in a
func getExpiryTime(hour int) *string {
const layout = "2006-01-02T15:04:05Z"
expiryTime := time.Now().Local().Add(time.Hour *time.Duration(hour))
return aws.String(expiryTime.Format(layout))
}
What would be the best way to write unit test for this function?