Added test_enc to unit tests.

Added test_enc to unit tests.