As the work of this migration did take quite some time, some changes where made in master after this branch was started. These are ported to the new test file.