Scotland to be test bed for public defenders