Bug 839746: added tests