{ package NotASubclass; use Test::Exception; throws_ok { Account->new-> setCreditAmount( 42 ) } qr/is_protected/; }