Test 'set' functions

These are used by the pre-defined units but should be tested
separately in case there are for example any errors during the process.