Improve test cases. Update of deprecated interfaces.