@Test public void testProtectedResourcesDelegation() { Set<IResource> expectedResources = Collections.singleton(DataResource.fromName("data")); doReturn(expectedResources).when(mockPasswordAuthenticator).protectedResources(); assertThat(authenticator.protectedResources()).isEqualTo(expectedResources); verify(mockPasswordAuthenticator, times(1)).protectedResources(); }
@Override public Set<? extends IResource> protectedResources() { return wrappedAuthenticator.protectedResources(); }
DecoratedPasswordAuthenticator implements IDecoratedAuthenticator { @Override public Set<? extends IResource> protectedResources() { return wrappedAuthenticator.protectedResources(); } }
DecoratedPasswordAuthenticator implements IDecoratedAuthenticator { @Override public Set<? extends IResource> protectedResources() { return wrappedAuthenticator.protectedResources(); } DecoratedPasswordAuthenticator(); @VisibleForTesting  DecoratedPasswordAuthenticator(PasswordAuthenticator authenticator); }
DecoratedPasswordAuthenticator implements IDecoratedAuthenticator { @Override public Set<? extends IResource> protectedResources() { return wrappedAuthenticator.protectedResources(); } DecoratedPasswordAuthenticator(); @VisibleForTesting  DecoratedPasswordAuthenticator(PasswordAuthenticator authenticator); @Override boolean requireAuthentication(); @Override Set<? extends IResource> protectedResources(); @Override void validateConfiguration(); @Override void setup(); @Override Set<IRoleManager.Option> supportedOptions(); @Override Set<IRoleManager.Option> alterableOptions(); @Override SaslNegotiator newSaslNegotiator(); @Override DecoratedSaslNegotiator newDecoratedSaslNegotiator(); @Override AuthenticatedUser legacyAuthenticate(Map<String, String> credentials); }
DecoratedPasswordAuthenticator implements IDecoratedAuthenticator { @Override public Set<? extends IResource> protectedResources() { return wrappedAuthenticator.protectedResources(); } DecoratedPasswordAuthenticator(); @VisibleForTesting  DecoratedPasswordAuthenticator(PasswordAuthenticator authenticator); @Override boolean requireAuthentication(); @Override Set<? extends IResource> protectedResources(); @Override void validateConfiguration(); @Override void setup(); @Override Set<IRoleManager.Option> supportedOptions(); @Override Set<IRoleManager.Option> alterableOptions(); @Override SaslNegotiator newSaslNegotiator(); @Override DecoratedSaslNegotiator newDecoratedSaslNegotiator(); @Override AuthenticatedUser legacyAuthenticate(Map<String, String> credentials);  }