@Override
    public List<Integer> embed(String text, Context context) {
        throw new UnsupportedOperationException("This embedder only supports embed with tensor type");
    }
@Test
    public void testCachingInt() {
        int initialEmbeddingsDone = runtime.embeddingsDone;
        var context = new Embedder.Context("schema.indexing");

        var input = "This is a test string to embed";
        var t1 = (MixedTensor) embedder.embed(input, context, TensorType.fromSpec("tensor<int8>(dt{},x[8])"));
        assertEquals(initialEmbeddingsDone + 1, runtime.embeddingsDone);

        var t2 = (MixedTensor)embedder.embed(input, context, TensorType.fromSpec("tensor<int8>(dt{},x[4])"));
        assertEquals("Cached value was used", initialEmbeddingsDone + 1, runtime.embeddingsDone);

        assertNotEquals(t1, t2);
        for(int token = 0; token < 7; token ++) {
            for(int dim = 0; dim < 4; dim++) { // the four first should be equal
                assertEquals(t1.get(TensorAddress.of(token,dim)), t2.get(TensorAddress.of(token,dim)), 1e-6);
            }
        }
        // t2 only has 4 dimensions so this should be out of bounds which returns 0
        assertEquals(0, t2.get(TensorAddress.of(0,4)), 1e-6);

        input = "This is a different test string to embed";
        embedder.embed(input, context,TensorType.fromSpec("tensor<float>(dt{},x[8])"));
        assertEquals(initialEmbeddingsDone + 2, runtime.embeddingsDone);
    }