### Question:
SecurityServiceImpl extends ServiceSupport implements SecurityService { public boolean hasPermission(final AccessControlled controlled, final Permission permission) { checkNotNull(controlled); checkNotNull(permission); return controlled.hasPermission(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 hasPermissionAccessControlledNullArg1(){ assertNotNull(securityService); securityService.hasPermission(null, Permission.DELETE); }
@Test(expected=NullPointerException.class) public void hasPermissionAccessControlledNullArg2(){ assertNotNull(securityService); assertNotNull(ac); securityService.hasPermission(ac, null); }
@Test public void hasPermissionAccessControlled(){ securityService.hasPermission(ac, Permission.DELETE); verify(ac).hasPermission(Permission.DELETE); }