Added tests for cipher result factory.