func TestJobFuncConversion(t *testing.T) {
	payload := "I'm a payload!"
	jobFunc := func(job Job) ([]byte, error) {
		if string(job.Data()) != payload {
			t.Fatalf("expected payload %s, received %s", payload, string(job.Data()))
		}
		return []byte{}, nil
	}
	worker := NewWorker("test", jobFunc)
	worker.fn(mock.CreateMockJob(payload))
}
TestJobFuncConversion tests that our JobFunc is called when 'worker.fn' is called with a job.
package baseworker
import (
	"bytes"
	"encoding/binary"
	"fmt"
	"io"
	"net"
	"sync"
	"testing"
	"time"
	"github.com/Clever/gearcmd/baseworker/mock"
)