SecurityProviderImpl implements SecurityProvider, WhiteboardAware { @SuppressWarnings("UnusedDeclaration") protected void unbindPrivilegeConfiguration(PrivilegeConfiguration privilegeConfiguration) { this.privilegeConfiguration = null; } SecurityProviderImpl();  SecurityProviderImpl(@NotNull ConfigurationParameters configuration); @Override void setWhiteboard(@NotNull Whiteboard whiteboard); @Override Whiteboard getWhiteboard(); @NotNull @Override ConfigurationParameters getParameters(@Nullable String name); @NotNull @Override Iterable<? extends SecurityConfiguration> getConfigurations(); @SuppressWarnings("unchecked") @NotNull @Override T getConfiguration(@NotNull Class<T> configClass);  }
@Test public void testUnBindPrivilegeConfiguration() { PrivilegeConfiguration pc = Mockito.mock(PrivilegeConfiguration.class); securityProvider.bindPrivilegeConfiguration(pc); securityProvider.unbindPrivilegeConfiguration(pc); assertNull(securityProvider.getConfiguration(PrivilegeConfiguration.class)); for (SecurityConfiguration sc : securityProvider.getConfigurations()) { if (sc instanceof PrivilegeConfiguration) { fail(); } } }