### Question:
IdentityServiceInitializer { List<PermittableEndpoint> getPermittables(final @Nonnull String applicationUri) { try { final Anubis anubis = this.applicationCallContextProvider.getApplication(Anubis.class, applicationUri); return anubis.getPermittableEndpoints(); } catch (final RuntimeException unexpected) { logger.error("Request for permittable endpoints to '{}' failed.", applicationUri, unexpected); return Collections.emptyList(); } } @Autowired  IdentityServiceInitializer(
      final IdentityListener identityListener,
      final ApplicationCallContextProvider applicationCallContextProvider,
      final HashGenerator hashGenerator,
      @Qualifier(ProvisionerConstants.LOGGER_NAME) final Logger logger,
      final SystemProperties systemProperties); IdentityServiceInitializationResult initializeIsis(
          final @Nonnull String tenantIdentifier,
          final @Nonnull String applicationName,
          final @Nonnull String identityManagerUri); List<EventExpectation> postApplicationPermittableGroups(
          final @Nonnull String tenantIdentifier,
          final @Nonnull String identityManagerApplicationName,
          final @Nonnull String identityManagerApplicationUri,
          final @Nonnull String applicationUri); void postApplicationDetails(
          final @Nonnull String tenantIdentifier,
          final @Nonnull String identityManagerApplicationName,
          final @Nonnull String identityManagerApplicationUri,
          final @Nonnull String applicationName,
          final @Nonnull String applicationUri,
          final @Nonnull ApplicationSignatureSet applicationSignatureSet);  }### Answer:
@Test public void getPermittablesAnubisCallFails() throws Exception { final IdentityListener identityListenerMock = Mockito.mock(IdentityListener.class); final ApplicationCallContextProvider applicationCallContextProviderMock = Mockito.mock(ApplicationCallContextProvider.class); final Logger loggerMock = Mockito.mock(Logger.class); final Anubis anubisMock = Mockito.mock(Anubis.class); when(applicationCallContextProviderMock.getApplication(Anubis.class, "blah")).thenReturn(anubisMock); when(anubisMock.getPermittableEndpoints()).thenThrow(IllegalStateException.class); final SystemProperties systemProperties = new SystemProperties(); final List<PermittableEndpoint> ret = new IdentityServiceInitializer(identityListenerMock, applicationCallContextProviderMock, null, loggerMock, systemProperties) .getPermittables("blah"); Assert.assertEquals(ret, Collections.emptyList()); verify(loggerMock).error(anyString(), anyString(), isA(IllegalStateException.class)); }