rapuma mapper: decoder refactor tests for use with encoder.
rapuma mapper: encoder and tests.