synchronized methods
added tests for synchronized methods.