@Test public void testConstructFromAuditConfigWorksAsExpected() { String wrappedAuthenticatorName = DecoratedPasswordAuthenticator.class.getName(); when(mockConfig.getWrappedAuthenticator()).thenReturn(wrappedAuthenticatorName); IDecoratedAuthenticator wrappedAuthenticator = AuditAuthenticator.newWrappedAuthenticator(mockConfig); assertThat(wrappedAuthenticator).isInstanceOf(DecoratedPasswordAuthenticator.class); }
@VisibleForTesting static IDecoratedAuthenticator newWrappedAuthenticator(AuditConfig auditConfig) { String className = auditConfig.getWrappedAuthenticator(); return FBUtilities.construct(className, "authenticator"); }
AuditAuthenticator implements IAuthenticator { @VisibleForTesting static IDecoratedAuthenticator newWrappedAuthenticator(AuditConfig auditConfig) { String className = auditConfig.getWrappedAuthenticator(); return FBUtilities.construct(className, "authenticator"); } }
AuditAuthenticator implements IAuthenticator { @VisibleForTesting static IDecoratedAuthenticator newWrappedAuthenticator(AuditConfig auditConfig) { String className = auditConfig.getWrappedAuthenticator(); return FBUtilities.construct(className, "authenticator"); } AuditAuthenticator();   AuditAuthenticator(IDecoratedAuthenticator wrappedAuthenticator, AuditAdapter auditAdapter); }
AuditAuthenticator implements IAuthenticator { @VisibleForTesting static IDecoratedAuthenticator newWrappedAuthenticator(AuditConfig auditConfig) { String className = auditConfig.getWrappedAuthenticator(); return FBUtilities.construct(className, "authenticator"); } AuditAuthenticator();   AuditAuthenticator(IDecoratedAuthenticator wrappedAuthenticator, AuditAdapter auditAdapter); @Override boolean requireAuthentication(); @Override Set<? extends IResource> protectedResources(); @Override void validateConfiguration(); @Override void setup(); @Override SaslNegotiator newSaslNegotiator(); @Override AuthenticatedUser legacyAuthenticate(Map<String, String> credentials); }
AuditAuthenticator implements IAuthenticator { @VisibleForTesting static IDecoratedAuthenticator newWrappedAuthenticator(AuditConfig auditConfig) { String className = auditConfig.getWrappedAuthenticator(); return FBUtilities.construct(className, "authenticator"); } AuditAuthenticator();   AuditAuthenticator(IDecoratedAuthenticator wrappedAuthenticator, AuditAdapter auditAdapter); @Override boolean requireAuthentication(); @Override Set<? extends IResource> protectedResources(); @Override void validateConfiguration(); @Override void setup(); @Override SaslNegotiator newSaslNegotiator(); @Override AuthenticatedUser legacyAuthenticate(Map<String, String> credentials);  }