Help for this page
my $account = Account->new; $account->addToAccount( 10 ); is( $account->getCreditAmount, 10, 'added ten' );
{ package NotASubclass; use Test::Exception; throws_ok { Account->new-> setCreditAmount( 42 ) } qr/is_protected/; }