Adding support for detailed history ( history v2 ) , and unit tests

Support for using detailedHistory api added along with unit tests for detailedHistory api