The test should fail if the Encoder fails. So use `t.Fatal(err)` here instead.