You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: caches_test.go
    path of file: ./repos/kala/job
    
    the code of the file until where you have to start completion: package job

import (
	"testing"

	"github.com/stretchr/testify/assert"
)

// This file contains tests that can be run against all types of JobCaches.

func TestCache(t *testing.T) {

	tt := []struct {
		c JobCache
	}{
		{
			c: NewLockFreeJobCache(&MockDB{}),
		},
		{
			c: NewMemoryJobCache(&MockDB{}),
		},
	}

	for _, row := range tt {
		t.Run("", func(t *testing.T) {
			testCache(t, row.c)
		})
	}

}

func testCache(t *testing.T, cache JobCache) {

	t.Run("TestCacheDeleteJobNotFound", func(t *testing.T) {
		err := cache.Delete("not-a-real-id")
		assert.Equal(t, ErrJobDoesntExist, err)
	})

	t.Run("TestCache
    
func TestCachePersistence(t *testing.T) {

	mdb1a := NewMemoryDB()
	cache1a := NewMemoryJobCache(mdb1a)

	mdb1b := NewMemoryDB()
	cache1b := NewMemoryJobCache(mdb1b)
	cache1b.PersistOnWrite = true

	mdb2a := NewMemoryDB()
	cache2a := NewLockFreeJobCache(mdb2a)

	mdb2b := NewMemoryDB()
	cache2b := NewLockFreeJobCache(mdb2b)
	cache2b.PersistOnWrite = true

	tt := []struct {
		db            JobDB
		c             JobCache
		shouldPersist bool
	}{
		{
			db:            mdb1a,
			c:             cache1a,
			shouldPersist: false,
		},
		{
			db:            mdb1b,
			c:             cache1b,
			shouldPersist: true,
		},
		{
			db:            mdb2a,
			c:             cache2a,
			shouldPersist: false,
		},
		{
			db:            mdb2b,
			c:             cache2b,
			shouldPersist: true,
		},
	}

	for _, row := range tt {
		t.Run("", func(t *testing.T) {
			testCachePersistence(t, row.c, row.db, row.shouldPersist)
		})
	}

}