PDI-10242
What was done
1. added unit and integration tests verifying the fix and old behavior
2. refactored existing unit tests to minimize copypasting
PDI-10242
What was done
1. Added encoding lookup in variables