tests implemented, security manager behavior changed,  some fixes