Test case added for engine

Shouldn't this be after the `Register()` call? If the test fails, then the handler won't be unregistered (`t.Fatalf()` halts execution of the goroutine).