ImmutableAccessControlList implements AccessControlList { @Override public Permissions getPermissionsOf(final AuthorizationSubject authorizationSubject) { checkNotNull(authorizationSubject, "authorization subject to get the permissions for"); return getEntryFor(authorizationSubject) .map(AclEntry::getPermissions) .orElseGet(AccessControlListModelFactory::noPermissions); } private  ImmutableAccessControlList(final Map<AuthorizationSubject, AclEntry> theEntries); private  ImmutableAccessControlList(final Collection<AclEntry> theEntries); static AccessControlList empty(); static AccessControlList of(final AclEntry entry, final AclEntry... furtherEntries); static AccessControlList of(final Iterable<AclEntry> entries); static AccessControlList fromJson(final JsonObject jsonObject); @Override AccessControlList merge(final AclEntry entry); @Override AccessControlList merge(final AuthorizationSubject authorizationSubject, final Permission permission,
            final Permission... furtherPermissions); @Override AccessControlList merge(final Permission permission, final AuthorizationSubject authorizationSubject,
            final AuthorizationSubject... furtherAuthorizationSubjects); @Override AccessControlList setEntry(final AclEntry aclEntry); @Override AccessControlList setForAllAuthorizationSubjects(final Permissions permissions); @Override Set<AuthorizationSubject> getAuthorizedSubjectsFor(final Permission permission,
            final Permission... furtherPermissions); @Override boolean hasPermission(final AuthorizationContext authorizationContext, final Permission permission,
            final Permission... furtherPermissions); @Override boolean hasPermission(final AuthorizationSubject authorizationSubject, final Permission permission,
            final Permission... furtherPermissions); @Override Set<AuthorizationSubject> getAuthorizedSubjectsFor(final Permissions expectedPermissions); @Override boolean contains(final AuthorizationSubject authorizationSubject); @Override Optional<AclEntry> getEntryFor(final AuthorizationSubject authorizationSubject); @Override Permissions getPermissionsOf(final AuthorizationSubject authorizationSubject); @Override AccessControlList removeEntry(final AclEntry entry); @Override AccessControlList removePermission(final AuthorizationSubject authorizationSubject,
            final Permission permission, final Permission... furtherPermissions); @Override AccessControlList removeAllPermissionsOf(final AuthorizationSubject authorizationSubject); @Override boolean isEmpty(); @Override int getSize(); @Override Set<AclEntry> getEntriesSet(); @Override Stream<AclEntry> stream(); @Override Iterator<AclEntry> iterator(); @Override JsonObject toJson(final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }
@Test(expected = NullPointerException.class) public void tryToGetPermissionsForNullAuthorizationSubject() { underTest.getPermissionsOf(null); }