package jobdef

import "testing"

func TestRegistryGetReturnsRegisteredHandler(t *testing.T) {
	registry := NewRegistry(SampleHandler{})

	handler, ok := registry.Get("sample-handler")
	if !ok {
		t.Fatal("expected registered handler")
	}

	if handler.Key() != "sample-handler" {
		t.Fatalf("handler key = %q, want sample-handler", handler.Key())
	}
}
