@Override
    public YamlUserConfiguration swapToYamlConfiguration(final ShardingSphereUser data) {
        if (null == data) {
            return null;
        }
        YamlUserConfiguration result = new YamlUserConfiguration();
        result.setUser(data.getGrantee().toString());
        result.setPassword(data.getPassword());
        result.setAuthenticationMethodName(data.getAuthenticationMethodName());
        result.setAdmin(data.isAdmin());
        return result;
    }
@Test
    void assertSwapToYamlConfiguration() {
        YamlUserConfiguration actual = new YamlUserSwapper().swapToYamlConfiguration(new ShardingSphereUser("foo_user", "foo_pwd", "127.0.0.1"));
        assertNotNull(actual);
        assertThat(actual.getUser(), is("foo_user@127.0.0.1"));
        assertThat(actual.getPassword(), is("foo_pwd"));
    }