Add tests to all ValueFactory and ValueConversion methods

The tests verify that a value after an encode-decode cycle remain the same. I created tests for all methods.