QueryConfigurationServiceImpl implements QueryConfigurationService { @Override public boolean init(Cache cache) { if (cache == null) { throw new IllegalArgumentException(NULL_CACHE_ERROR_MESSAGE); } if (System.getProperty(ALLOW_UNTRUSTED_METHOD_INVOCATION_SYSTEM_PROPERTY) != null) { logger.warn(DEPRECATION_WARNING); } if (isSecurityDisabled((InternalCache) cache) || ALLOW_UNTRUSTED_METHOD_INVOCATION) { this.authorizer = NO_OP_AUTHORIZER; } else { this.authorizer = new RestrictedMethodAuthorizer(cache); } return true; } QueryConfigurationServiceImpl(); static MethodInvocationAuthorizer getNoOpAuthorizer(); @Override boolean init(Cache cache); @Override Class<? extends CacheService> getInterface(); @Override CacheServiceMBeanBase getMBean(); @Override void close(); @Override MethodInvocationAuthorizer getMethodAuthorizer(); @Override void updateMethodAuthorizer(Cache cache, boolean forceUpdate,
      QueryMethodAuthorizerCreation creation); @Override void updateMethodAuthorizer(Cache cache, boolean forceUpdate, String className,
      Set<String> parameters); static final String INTERFACE_NOT_IMPLEMENTED_MESSAGE; static final String CONTINUOUS_QUERIES_RUNNING_MESSAGE; @Deprecated
  final boolean ALLOW_UNTRUSTED_METHOD_INVOCATION; @Deprecated
  static final String ALLOW_UNTRUSTED_METHOD_INVOCATION_SYSTEM_PROPERTY; static final String DEPRECATION_WARNING; }
@Test public void initThrowsExceptionWhenCacheIsNull() { assertThatThrownBy(() -> configService.init(null)) .isInstanceOf(IllegalArgumentException.class) .hasMessage(NULL_CACHE_ERROR_MESSAGE); }