Tests for Bug-976407 and Bug-976406 as per review comments

Updated tests for Bug-976407 and Bug-976406 as per review comments