BootstrapEnvironment { public Optional<String> getMesosRole() { String role = getValue(EnvironmentArgument.MESOS_ROLE); if (Strings.isNullOrEmpty(role)) { return Optional.empty(); } return Optional.of(role); } private  BootstrapEnvironment(); String getFrameworkHostPort(); MesosConfiguration getMesosConfiguration(); ZookeeperConfiguration getZookeeperConfiguration(); RestfulServerConfiguration getRestfulServerConfiguration(); FrameworkConfiguration getFrameworkConfiguration(); Optional<TracingConfiguration> getTracingConfiguration(); HashMap<String, String> getJobEventRdbConfigurationMap(); Optional<String> getMesosRole();  }
@Test public void assertGetMesosRole() { assertThat(bootstrapEnvironment.getMesosRole(), is(Optional.empty())); Properties properties = new Properties(); properties.setProperty(BootstrapEnvironment.EnvironmentArgument.MESOS_ROLE.getKey(), "0"); ReflectionUtils.setFieldValue(bootstrapEnvironment, "properties", properties); assertThat(bootstrapEnvironment.getMesosRole(), is(Optional.of("0"))); }