@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 assertSwapToNullYamlConfiguration() {
        assertNull(new YamlUserSwapper().swapToYamlConfiguration(null));
    }