### Question:
ScriptServiceImpl extends ServiceSupport implements ScriptService { public String execute(final String script) throws Exception { checkNotNull(script); security.checkPermission(Hudson.ADMINISTER); log.debug("Executing script on master: {}", script); return RemotingDiagnostics.executeGroovy(script, MasterComputer.localChannel); } @Inject  ScriptServiceImpl(final SecurityService security); String execute(final String script);  }### Answer:
@Test(expected = NullPointerException.class) public void executeArgNull() throws Exception { getInst().execute(null); }
@Test public void executeSecurity() throws Exception { getInst().execute("String bogus"); Mockito.verify(security).checkPermission(Hudson.ADMINISTER); }