DRY up test code for problem model.