### Question:
BootstrapEnvironment { public Optional<JobEventRdbConfiguration> getJobEventRdbConfiguration() { String driver = getValue(EnvironmentArgument.EVENT_TRACE_RDB_DRIVER); String url = getValue(EnvironmentArgument.EVENT_TRACE_RDB_URL); String username = getValue(EnvironmentArgument.EVENT_TRACE_RDB_USERNAME); String password = getValue(EnvironmentArgument.EVENT_TRACE_RDB_PASSWORD); if (!Strings.isNullOrEmpty(driver) && !Strings.isNullOrEmpty(url) && !Strings.isNullOrEmpty(username)) { BasicDataSource dataSource = new BasicDataSource(); dataSource.setDriverClassName(driver); dataSource.setUrl(url); dataSource.setUsername(username); dataSource.setPassword(password); return Optional.of(new JobEventRdbConfiguration(dataSource)); } return Optional.absent(); } private  BootstrapEnvironment(); String getFrameworkHostPort(); MesosConfiguration getMesosConfiguration(); ZookeeperConfiguration getZookeeperConfiguration(); RestfulServerConfiguration getRestfulServerConfiguration(); FrameworkConfiguration getFrameworkConfiguration(); Optional<JobEventRdbConfiguration> getJobEventRdbConfiguration(); HashMap<String, String> getJobEventRdbConfigurationMap(); Optional<String> getMesosRole();  }### Answer:
@Test public void assertGetEventTraceRdbConfiguration() throws NoSuchFieldException { Properties properties = new Properties(); properties.setProperty(BootstrapEnvironment.EnvironmentArgument.EVENT_TRACE_RDB_DRIVER.getKey(), "org.h2.Driver"); properties.setProperty(BootstrapEnvironment.EnvironmentArgument.EVENT_TRACE_RDB_URL.getKey(), "jdbc:h2:mem:job_event_trace"); properties.setProperty(BootstrapEnvironment.EnvironmentArgument.EVENT_TRACE_RDB_USERNAME.getKey(), "sa"); properties.setProperty(BootstrapEnvironment.EnvironmentArgument.EVENT_TRACE_RDB_PASSWORD.getKey(), "password"); ReflectionUtils.setFieldValue(bootstrapEnvironment, "properties", properties); Optional<JobEventRdbConfiguration> jobEventRdbConfiguration = bootstrapEnvironment.getJobEventRdbConfiguration(); if (jobEventRdbConfiguration.isPresent()) { Assert.assertThat(jobEventRdbConfiguration.get().getDataSource(), IsInstanceOf.instanceOf(BasicDataSource.class)); } }
@Test public void assertWithoutEventTraceRdbConfiguration() throws NoSuchFieldException { Assert.assertFalse(bootstrapEnvironment.getJobEventRdbConfiguration().isPresent()); }