ClientOptions { public static ClientOptionsBuilder builder() { return new ClientOptionsBuilder(); } private  ClientOptions(String id, String user, String password, SSLOptions sslOptions); String getId(); String getUser(); String getPassword(); SSLOptions getSSLOptions(); @Override String toString(); static ClientOptionsBuilder builder();  }
@Test public void clientIdValidChars() { ClientOptions.builder().setId("abcdefghijklmnopqrstuvwxyz").build(); ClientOptions.builder().setId("ABCDEFGHIJKLMNOPQRSTUVWXYZ").build(); ClientOptions.builder().setId("0123456789").build(); ClientOptions.builder().setId("%./_").build(); try { ClientOptions.builder().setId("badid!").build(); throw new AssertionFailedError("ID should have been rejected"); } catch(IllegalArgumentException e) { } }