@Test
  public void originally_empty_webdriver_system_properties_should_be_removed() throws Throwable {

    System.clearProperty(SYSTEM_PROPERTY);

    SaveWebdriverSystemPropertiesRule rule = new SaveWebdriverSystemPropertiesRule();
    Statement statementWithRule = rule.apply(statement, frameworkMethod, testClass);

    System.setProperty(SYSTEM_PROPERTY, "http://www.amazon.com");

    statementWithRule.evaluate();

    assertThat(System.getProperty(SYSTEM_PROPERTY), is(nullValue()));
  }
  @Test
  public void webdriver_system_properties_should_be_saved_and_restored_when_a_test_modifies_them()
      throws Throwable {

    System.setProperty(SYSTEM_PROPERTY, "original-value");

    SaveWebdriverSystemPropertiesRule rule = new SaveWebdriverSystemPropertiesRule();
    Statement statementWithRule = rule.apply(statement, frameworkMethod, testClass);

    System.setProperty(SYSTEM_PROPERTY, "new-value-for-tests");

    statementWithRule.evaluate();

    assertThat(System.getProperty(SYSTEM_PROPERTY), is("original-value"));
  }