PermissivePermissionCheckProvider extends AbstractPermissionCheckProvider implements PermissionCheckProvider { @Override public PermissionCheckProviderResult isPermitted(PermissionCheckProviderRequest request) { ArgumentChecker.notNull(request, "request"); Map<String, Boolean> result = new HashMap<>(request.getRequestedPermissions().size()); for (String permission : request.getRequestedPermissions()) { result.put(permission, true); } return PermissionCheckProviderResult.of(result); }  @Override PermissionCheckProviderResult isPermitted(PermissionCheckProviderRequest request);  }
@Test public void allTrueWithRequest() { PermissivePermissionCheckProvider test = new PermissivePermissionCheckProvider(); PermissionCheckProviderRequest request = PermissionCheckProviderRequest.createGet(ExternalIdBundle.of("A", "B"), "127.0.0.1", "A", "B", "C"); PermissionCheckProviderResult resultHolder = test.isPermitted(request); assertNotNull(resultHolder); assertNotNull(resultHolder.getCheckedPermissions()); Map<String, Boolean> permissionCheckResult = resultHolder.getCheckedPermissions(); assertPermissionResult(permissionCheckResult); resultHolder.checkErrors(); resultHolder.checkPermitted("A"); assertEquals(true, resultHolder.isPermitted("A")); }