### Question:
DockerTemplateOptions extends TemplateOptions implements Cloneable { public DockerTemplateOptions commands(Iterable<String> commands) { this.commands = NullSafeCopies.copyWithNullOf(commands); return this; }  @Override DockerTemplateOptions clone(); @Override void copyTo(TemplateOptions to); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); DockerTemplateOptions volumes(Map<String, String> volumes); DockerTemplateOptions dns(Iterable<String> dns); DockerTemplateOptions dns(String...dns); DockerTemplateOptions hostname(@Nullable String hostname); DockerTemplateOptions memory(@Nullable Integer memory); DockerTemplateOptions entrypoint(Iterable<String> entrypoint); DockerTemplateOptions entrypoint(String... entrypoint); DockerTemplateOptions commands(Iterable<String> commands); DockerTemplateOptions commands(String...commands); DockerTemplateOptions cpuShares(@Nullable Integer cpuShares); DockerTemplateOptions env(Iterable<String> env); DockerTemplateOptions env(String...env); DockerTemplateOptions portBindings(Map<Integer, Integer> portBindings); DockerTemplateOptions networkMode(@Nullable String networkMode); DockerTemplateOptions extraHosts(Map<String, String> extraHosts); DockerTemplateOptions volumesFrom(Iterable<String> volumesFrom); DockerTemplateOptions privileged(boolean privileged); DockerTemplateOptions openStdin(boolean openStdin); DockerTemplateOptions configBuilder(Config.Builder configBuilder); Map<String, String> getVolumes(); List<String> getDns(); List<String> getVolumesFrom(); String getHostname(); Integer getMemory(); List<String> getEntrypoint(); List<String> getCommands(); Integer getCpuShares(); List<String> getEnv(); Map<Integer, Integer> getPortBindings(); String getNetworkMode(); Map<String, String> getExtraHosts(); boolean getPrivileged(); boolean getOpenStdin(); Config.Builder getConfigBuilder(); @Override DockerTemplateOptions blockOnPort(int port, int seconds); @Override DockerTemplateOptions inboundPorts(int... ports); @Override DockerTemplateOptions authorizePublicKey(String publicKey); @Override DockerTemplateOptions installPrivateKey(String privateKey); @Override DockerTemplateOptions blockUntilRunning(boolean blockUntilRunning); @Override DockerTemplateOptions dontAuthorizePublicKey(); @Override DockerTemplateOptions nameTask(String name); @Override DockerTemplateOptions runAsRoot(boolean runAsRoot); @Override DockerTemplateOptions runScript(Statement script); @Override DockerTemplateOptions overrideLoginCredentials(LoginCredentials overridingCredentials); @Override DockerTemplateOptions overrideLoginPassword(String password); @Override DockerTemplateOptions overrideLoginPrivateKey(String privateKey); @Override DockerTemplateOptions overrideLoginUser(String loginUser); @Override DockerTemplateOptions overrideAuthenticateSudo(boolean authenticateSudo); @Override DockerTemplateOptions userMetadata(Map<String, String> userMetadata); @Override DockerTemplateOptions userMetadata(String key, String value); @Override DockerTemplateOptions nodeNames(Iterable<String> nodeNames); @Override DockerTemplateOptions networks(Iterable<String> networks);  }### Answer:
@Test public void testCommands() { TemplateOptions options = DockerTemplateOptions.Builder.commands("chmod 666 /etc/*", "rm -rf /var/run"); assertEquals(options.as(DockerTemplateOptions.class).getCommands(), ImmutableList.of("chmod 666 /etc/*", "rm -rf /var/run")); }