Code example for KeyManagementException

0
            identities.put(id, id);
        } 
 
        public void removeIdentity(Identity id) throws KeyManagementException {
            if (!identities.containsKey(id))
                throw new KeyManagementException(
                        "This Identity is not contained in the scope"); 
            identities.remove(id);
        } 
    } 
 
    /** 
     * @tests java.security.IdentityScope#IdentityScope() 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "IdentityScope", 
        args = {} 
    ) 
    public void test_Constructor() {