Revised for 2.0 libraries.
Regenerated test cases and sychronized with 2.1 changes.