@Test
    public void testSmallest() {
        assertSmallest("{d1:l1,d2:l1}:5.0",
                       "tensor(d1{},d2{}):{{d1:l1,d2:l1}:5.0,{d1:l1,d2:l2}:6.0}");
        assertSmallest("{d1:l1,d2:l1}:6.0, {d1:l1,d2:l2}:6.0",
                       "tensor(d1{},d2{}):{{d1:l1,d2:l1}:6.0,{d1:l1,d2:l2}:6.0}");
        assertSmallest("{d1:l1,d2:l1}:5.0, {d1:l1,d2:l2}:5.0",
                       "tensor(d1{},d2{}):{{d1:l1,d2:l1}:5.0,{d1:l1,d2:l3}:6.0,{d1:l1,d2:l2}:5.0}");
        assertSmallest("{x:0,y:0}:1.0",
                       "tensor(x[2],y[2]):[[1,2],[3,4]]");
        assertSmallest("{x:0,y:1}:2.0",
                       "tensor(x[2],y[2]):[[4,2],[3,4]]");
    }
Test the same computation made in various ways which are implemented with special-case optimizations
vespajlib/src/test/java/com/yahoo/tensor/TensorTestCase.java