Simple implementation of mappings, with tests.