### Question:
SecurityServiceImpl extends ServiceSupport implements SecurityService { public void checkPermission(final Permission permission) { getHudson().checkPermission(permission); } @Inject  SecurityServiceImpl(); void checkPermission(final Permission permission); User getCurrentUser(); User getUser(final String id); User getUnknownUser(); void runAs(final Authentication auth, final Runnable task); T callAs(final Authentication auth, final Callable<T> task); T callAs2(final Authentication auth, final Callable<T> task); void checkPermission(final AccessControlled controlled, final Permission permission); boolean hasPermission(final AccessControlled controlled, final Permission permission);  }### Answer:
@Test(expected=NullPointerException.class) public void checkPermissionNullArg1(){ assertNotNull(securityService); securityService.checkPermission(null); }
@Test(expected=NullPointerException.class) public void checkPermissionAccessControlledNullArg1(){ assertNotNull(securityService); securityService.checkPermission(null, Permission.DELETE); }
@Test(expected=NullPointerException.class) public void checkPermissionAccessControlledNullArg2(){ assertNotNull(securityService); assertNotNull(ac); securityService.checkPermission(ac, null); }
@Test public void checkPermissionAccessControlled(){ securityService.checkPermission(ac, Permission.DELETE); verify(ac).checkPermission(Permission.DELETE); }