first attempt for 2 pass digest

Adding test case for the static ref update

Please let make know if this can be consider a general scenerio that can be consider merge into the main branch?

Thanks.