Made test case more flexible with relation to issue #358