ExternalLoginModuleFactory implements LoginModuleFactory, SyncHandlerMapping { public void unbindSyncManager(SyncManager syncManager) { this.syncManager = null; }  @SuppressWarnings("UnusedDeclaration") void bindContentRepository(ContentRepository contentRepository); @SuppressWarnings("UnusedDeclaration") void unbindContentRepository(ContentRepository contentRepository); @SuppressWarnings("UnusedDeclaration") void bindSecurityProvider(SecurityProvider securityProvider); @SuppressWarnings("UnusedDeclaration") void unbindSecurityProvider(SecurityProvider securityProvider); void bindSyncManager(SyncManager syncManager); void unbindSyncManager(SyncManager syncManager); void bindIdpManager(ExternalIdentityProviderManager idpManager); void unbindIdpManager(ExternalIdentityProviderManager idpManager); @Override LoginModule createLoginModule(); @SuppressWarnings("UnusedDeclaration")
    @Property(
            intValue = 150,
            label = "JAAS Ranking",
            description = "Specifying the ranking (i.e. sort order) of this login module entry. The entries are sorted " +
                    "in a descending order (i.e. higher value ranked configurations come first)."
    )
    static final String JAAS_RANKING; @SuppressWarnings("UnusedDeclaration")
    @Property(
            value = "SUFFICIENT",
            label = "JAAS Control Flag",
            description = "Property specifying whether or not a LoginModule is REQUIRED, REQUISITE, SUFFICIENT or " +
                    "OPTIONAL. Refer to the JAAS configuration documentation for more details around the meaning of " +
                    "these flags."
    )
    static final String JAAS_CONTROL_FLAG; @SuppressWarnings("UnusedDeclaration")
    @Property(
            label = "JAAS Realm",
            description = "The realm name (or application name) against which the LoginModule  is be registered. If no " +
                    "realm name is provided then LoginModule is registered with a default realm as configured in " +
                    "the Felix JAAS configuration."
    )
    static final String JAAS_REALM_NAME; @Property(
            label = "Identity Provider Name",
            description = "Name of the identity provider (for example: 'ldap')."
    )
    static final String PARAM_IDP_NAME; @Property(
            value = "default",
            label = "Sync Handler Name",
            description = "Name of the sync handler."
    )
    static final String PARAM_SYNC_HANDLER_NAME; }
@Test public void testUnbindSyncManager() throws Exception { ExternalLoginModuleFactory factory = new ExternalLoginModuleFactory(); factory.bindSyncManager(syncManager); Field f = ExternalLoginModuleFactory.class.getDeclaredField("syncManager"); f.setAccessible(true); assertSame(syncManager, f.get(factory)); factory.unbindSyncManager(syncManager); assertNull(f.get(factory)); }