public boolean containsMapping(String tableName, Mappings mappings) {
        if (Objects.isNull(mappings) ||
            CollectionUtils.isEmpty(mappings.getProperties())) {
            return true;
        }

        return mappingStructures.containsKey(tableName)
            && mappingStructures.get(tableName)
                                .containsAllFields(new Fields(mappings));
    }
@Test
    public void containsMapping() {
        IndexStructures structures = new IndexStructures();
        HashMap<String, Object> properties = new HashMap<>();
        properties.put("a", "b");
        properties.put("c", "d");
        properties.put("f", "g");
        structures.putStructure("test", Mappings.builder()
                                                .type(ElasticSearchClient.TYPE)
                                                .properties(properties)
                                                .source(new Mappings.Source())
                                                .build(), new HashMap<>());

        HashMap<String, Object> properties2 = new HashMap<>();
        properties2.put("a", "b");
        properties2.put("c", "d");
        Assertions.assertTrue(structures.containsMapping(
            "test",
            Mappings.builder()
                    .type(ElasticSearchClient.TYPE)
                    .properties(properties2)
                    .source(new Mappings.Source())
                    .build()
        ));

        HashMap<String, Object> properties3 = new HashMap<>();
        properties3.put("a", "b");
        properties3.put("q", "d");
        Assertions.assertFalse(structures.containsMapping(
            "test",
            Mappings.builder()
                    .type(ElasticSearchClient.TYPE)
                    .properties(properties3)
                    .build()
        ));
    }