@Test
    public void testEmpty() {
        TensorType type = new TensorType.Builder().mapped("x").build();
        Tensor empty = Tensor.Builder.of(type).build();
        assertTrue(empty instanceof MappedTensor);
        assertTrue(empty.isEmpty());
        assertEquals("tensor(x{}):{}", empty.toString());
        Tensor emptyFromString = Tensor.from(type, "{}");
        assertEquals("tensor(x{}):{}", Tensor.from("tensor(x{}):{}").toString());
        assertTrue(emptyFromString.isEmpty());
        assertTrue(emptyFromString instanceof MappedTensor);
        assertEquals(empty, emptyFromString);
    }
Basic tensor tests. Tensor operations are tested in EvaluationTestCase

@author bratseth
vespajlib/src/test/java/com/yahoo/tensor/MappedTensorTestCase.java