@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 assertSwapToObjectWithEmptyUsername() {
        YamlUserConfiguration user = new YamlUserConfiguration();
        user.setUser("@127.0.0.1");
        assertThrows(IllegalArgumentException.class, () -> new YamlUserSwapper().swapToObject(user));
    }