GrantRevokeIndex { GrantRevokeIndex overrideBy(final GrantRevokeIndex update) { checkNotNull(update, "update"); grantMap.addAllEntriesFrom(update.grantMap).removeAllEntriesFrom(update.revokeMap); revokeMap.removeAllEntriesFrom(update.grantMap).addAllEntriesFrom(update.revokeMap); return this; } GrantRevokeIndex();   GrantRevokeIndex(final PermissionSubjectsMap grantMap, final PermissionSubjectsMap revokeMap); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }
@SuppressWarnings("ConstantConditions") @Test public void tryToOverrideByNull() { assertThatExceptionOfType(NullPointerException.class) .isThrownBy(() -> underTest.overrideBy(null)) .withMessage("The %s must not be null!", "update") .withNoCause(); }