@Test void canBuildCommandNullOptionals() { final Command.Builder builder = new Command.Builder(NAME, USER, VERSION, CommandStatus.ACTIVE, EXECUTABLE_AND_ARGS, CHECK_DELAY); builder.withSetupFile(null); builder.withConfigs(null); builder.withDependencies(null); builder.withCreated(null); builder.withDescription(null); builder.withId(null); builder.withTags(null); builder.withUpdated(null); builder.withMemory(null); builder.withClusterCriteria(null); final Command command = builder.build(); Assertions.assertThat(command.getName()).isEqualTo(NAME); Assertions.assertThat(command.getUser()).isEqualTo(USER); Assertions.assertThat(command.getVersion()).isEqualTo(VERSION); Assertions.assertThat(command.getStatus()).isEqualTo(CommandStatus.ACTIVE); Assertions.assertThat(command.getExecutable()).isEqualTo(EXECUTABLE); Assertions.assertThat(command.getExecutableAndArguments()).isEqualTo(EXECUTABLE_AND_ARGS); Assertions.assertThat(command.getSetupFile()).isNotPresent(); Assertions.assertThat(command.getConfigs()).isEmpty(); Assertions.assertThat(command.getDependencies()).isEmpty(); Assertions.assertThat(command.getCreated()).isNotPresent(); Assertions.assertThat(command.getDescription()).isNotPresent(); Assertions.assertThat(command.getId()).isNotPresent(); Assertions.assertThat(command.getTags()).isEmpty(); Assertions.assertThat(command.getUpdated()).isNotPresent(); Assertions.assertThat(command.getMemory()).isNotPresent(); Assertions.assertThat(command.getClusterCriteria()).isEmpty(); }
public Optional<Integer> getMemory() { return Optional.ofNullable(this.memory); }
Command extends ExecutionEnvironmentDTO { public Optional<Integer> getMemory() { return Optional.ofNullable(this.memory); } }
Command extends ExecutionEnvironmentDTO { public Optional<Integer> getMemory() { return Optional.ofNullable(this.memory); } protected  Command(@Valid final Builder builder); }
Command extends ExecutionEnvironmentDTO { public Optional<Integer> getMemory() { return Optional.ofNullable(this.memory); } protected  Command(@Valid final Builder builder); Optional<Integer> getMemory(); }
Command extends ExecutionEnvironmentDTO { public Optional<Integer> getMemory() { return Optional.ofNullable(this.memory); } protected  Command(@Valid final Builder builder); Optional<Integer> getMemory(); static final long DEFAULT_CHECK_DELAY; }