Add tests and attribute handlers for $h->{switch_prepared}