private void addTensors(Tensor tensor1, Tensor tensor2, Cursor docsum) {
        if (tensor1 != null)
            docsum.setData("tensor_field1", TypedBinaryFormat.encode(tensor1));
        if (tensor2 != null)
            docsum.setData("tensor_field2", TypedBinaryFormat.encode(tensor2));

        if (tensor1 !=null && tensor2 != null) {
            Cursor summaryFeatures = docsum.setObject("summaryfeatures");
            summaryFeatures.setDouble("double_feature", 0.5);

            // Values produced by functions are wrapped in rankingExpression(function-name)
            summaryFeatures.setData("rankingExpression(tensor1_feature)", TypedBinaryFormat.encode(tensor1));
            summaryFeatures.setData("tensor2_feature", TypedBinaryFormat.encode(tensor2));
        }
    }
Asserts that the expected fields are what is returned from every access method of Hit
container-search/src/test/java/com/yahoo/prelude/fastsearch/SlimeSummaryTestCase.java