Mocking (and testing args)
we can mock assert_script_run and check the command called are the one expected, and return the value we want
subtest '[test for any SLE, no RT, no SLED]' => sub {
my $func = Test::MockModule->new('security::openssl', no_auto => 1);
my @calls;
$func->redefine(assert_script_run =>
sub { push @calls, ['', $_[0]]; return; });
$func->redefine(script_output =>
sub { return 'the very long string command output'; });)
ok(($#calls > 0), "There are some command called");
ok((any { /systemctl / } @cmds),
'executed commands contains systemctl');
}