public void createIndex(DBObject keys, DBObject options) {
        delegate.createIndex(new BasicDBObject(keys.toMap()), toIndexOptions(options));
    }
@Test
    void createIndexWithOptions() {
        final var collection = jacksonCollection("simple", Simple.class);
        collection.createIndex(new BasicDBObject("name", 1), new BasicDBObject("sparse", true).append("unique", true));
        assertThat(mongoCollection("simple").listIndexes()).containsExactlyInAnyOrder(
                new Document("key", new Document("_id", 1))
                        .append("name", "_id_")
                        .append("v", 2),
                new Document("key", new Document("name", 1))
                        .append("name", "name_1")
                        .append("sparse", true)
                        .append("unique", true)
                        .append("v", 2)
        );
    }