Make better use of Native(En|De)coder in tests.