GleSYSTemplateOptions extends TemplateOptions implements Cloneable { public GleSYSTemplateOptions rootPassword(String rootPassword) { checkNotNull(rootPassword, "root password cannot be null"); this.rootPassword = rootPassword; return this; }  @Override GleSYSTemplateOptions clone(); @Override void copyTo(TemplateOptions to); GleSYSTemplateOptions ip(String ip); String getIp(); GleSYSTemplateOptions rootPassword(String rootPassword); String getRootPassword(); boolean hasRootPassword(); GleSYSTemplateOptions transferGB(int transferGB); int getTransferGB(); @Override GleSYSTemplateOptions blockOnPort(int port, int seconds); @Override GleSYSTemplateOptions inboundPorts(int... ports); @Override GleSYSTemplateOptions authorizePublicKey(String publicKey); @Override GleSYSTemplateOptions installPrivateKey(String privateKey); @Override GleSYSTemplateOptions userMetadata(Map<String, String> userMetadata); @Override GleSYSTemplateOptions userMetadata(String key, String value); @Override ToStringHelper string();  }
@Test public void testRootPassword() { TemplateOptions options = new GleSYSTemplateOptions().rootPassword("secret"); assertEquals(options.as(GleSYSTemplateOptions.class).getRootPassword(), "secret"); }
@Test(expectedExceptions = NullPointerException.class) public void testNullRootPasswordThrowsNPE() { new GleSYSTemplateOptions().rootPassword(null); }