refactored tests for SF bug #1297