@Test
public void testRemovePassword() {

    DomainConfiguration conf = createDefaultDomainConfiguration();
    Domain domain = mock(Domain.class);
    when(domain.getPassword(PASSWORD.getName())).thenReturn(PASSWORD);
    conf.addPassword(domain, PASSWORD);
    conf.removePassword(PASSWORD_NAME);
    assertFalse("Configuration should have password removed", conf.usesPassword(PASSWORD_NAME));
}