### Question:
RemoteConfigurationRegistryJAASConfig extends Configuration { static RemoteConfigurationRegistryJAASConfig configure(List<RemoteConfigurationRegistryConfig> configs, AliasService aliasService) { return new RemoteConfigurationRegistryJAASConfig(configs, aliasService); } private  RemoteConfigurationRegistryJAASConfig(List<RemoteConfigurationRegistryConfig> configs, AliasService aliasService); @Override AppConfigurationEntry[] getAppConfigurationEntry(String name);  }### Answer:
@Test public void testZooKeeperDigestContextEntryWithoutAliasService() throws Exception { List<RemoteConfigurationRegistryConfig> registryConfigs = new ArrayList<>(); final String ENTRY_NAME = "my_digest_context"; final String DIGEST_PRINCIPAL = "myIdentity"; final String DIGEST_PWD_ALIAS = "myAlias"; registryConfigs.add(createDigestConfig(ENTRY_NAME, DIGEST_PRINCIPAL, DIGEST_PWD_ALIAS)); try { RemoteConfigurationRegistryJAASConfig jaasConfig = RemoteConfigurationRegistryJAASConfig.configure(registryConfigs, null); assertNotNull(jaasConfig); fail("Expected IllegalArgumentException because the AliasService is not available."); } catch (IllegalArgumentException e) { assertTrue(e.getMessage().contains("AliasService")); } catch (Throwable e) { fail("Wrong exception encountered: " + e.getClass().getName() + ", " + e.getMessage()); } finally { Configuration.setConfiguration(null); } }