@Override
    public ShardingSphereSchema swapToObject(final YamlShardingSphereSchema yamlConfig) {
        return Optional.ofNullable(yamlConfig).map(this::swapSchema).orElseGet(() -> new ShardingSphereSchema(yamlConfig.getName()));
    }
@Test
    void assertSwapToShardingSphereSchema() {
        YamlShardingSphereSchema yamlSchema = YamlEngine.unmarshal(readYAML(YAML), YamlShardingSphereSchema.class);
        ShardingSphereSchema actualSchema = new YamlSchemaSwapper().swapToObject(yamlSchema);
        assertThat(actualSchema.getAllTableNames(), is(Collections.singleton("t_order")));
        ShardingSphereTable actualTable = actualSchema.getTable("t_order");
        assertColumn(actualTable);
        assertThat(actualTable.getIndexValues().size(), is(1));
        assertThat(actualTable.getIndexValues().iterator().next().getName(), is("PRIMARY"));
        assertThat(actualSchema.getAllColumnNames("t_order").size(), is(2));
        assertTrue(actualSchema.containsColumn("t_order", "id"));
        assertTrue(actualSchema.containsColumn("t_order", "name"));
    }