@Override
    public ShardingSphereUser swapToObject(final YamlUserConfiguration yamlConfig) {
        if (null == yamlConfig) {
            return null;
        }
        Grantee grantee = convertYamlUserToGrantee(yamlConfig.getUser());
        return new ShardingSphereUser(grantee.getUsername(), yamlConfig.getPassword(), grantee.getHostname(), yamlConfig.getAuthenticationMethodName(), yamlConfig.isAdmin());
    }
@Test
    void assertSwapToObjectWithUserEndWithAt() {
        YamlUserConfiguration user = new YamlUserConfiguration();
        user.setUser("foo_user@");
        user.setPassword("foo_pwd");
        ShardingSphereUser actual = new YamlUserSwapper().swapToObject(user);
        assertNotNull(actual);
        assertThat(actual.getGrantee().getUsername(), is("foo_user"));
        assertThat(actual.getGrantee().getHostname(), is("%"));
        assertThat(actual.getPassword(), is("foo_pwd"));
    }