@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 assertAuthenticateFailed() {
        ShardingSphereUser user = new ShardingSphereUser("foo", "password", "%");
        byte[] password = "wrong".getBytes();
        assertFalse(new MySQLClearPasswordAuthenticator().authenticate(user, new Object[]{password}));
    }