Avoid use of deprecated features and add new test case for adjustMethodStyle.