static byte[] getSecretBytes(String secret) throws IllegalArgumentException {
        if (secret == null) {
            throw new IllegalArgumentException("The Secret cannot be null");
        }
        return secret.getBytes(StandardCharsets.UTF_8);
    }
static byte [ ] getSecretBytes ( String secret ) throws IllegalArgumentException { if ( secret == null ) { throw new IllegalArgumentException ( "The Secret cannot be null" ) ; } return secret . getBytes ( StandardCharsets . UTF_8 ) ; }
Visible for testing