fix the junit support in the demo project and support for old versioned api