@Test
    public void testSerializationToSeparateType() {
        try {
            assertSerialization(Tensor.from("tensor(x{},y{}):{{x:0,y:0}:2.0}"), TensorType.fromSpec("tensor(x{})"));
            fail("Expected exception");
        }
        catch (IllegalArgumentException expected) {
            assertEquals("Type/instance mismatch: A tensor of type tensor(x{},y{}) cannot be assigned to type tensor(x{})", expected.getMessage());
        }
    }
Tests for the sparse binary format.

@author geirst
vespajlib/src/test/java/com/yahoo/tensor/serialization/SparseBinaryFormatTestCase.java