@Override
    public boolean authenticate(final ShardingSphereUser user, final Object[] authInfo) {
        byte[] authResponse = (byte[]) authInfo[0];
        byte[] password = new byte[authResponse.length - 1];
        System.arraycopy(authResponse, 0, password, 0, authResponse.length - 1);
        return Strings.isNullOrEmpty(user.getPassword()) || user.getPassword().equals(new String(password));
    }
@Test
    void assertAuthenticate() {
        ShardingSphereUser user = new ShardingSphereUser("foo", "password", "%");
        byte[] password = "password".getBytes();
        byte[] authInfo = new byte[password.length + 1];
        System.arraycopy(password, 0, authInfo, 0, password.length);
        assertTrue(new MySQLClearPasswordAuthenticator().authenticate(user, new Object[]{authInfo}));
    }