@Override
  public boolean isDetected() {
    // https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project
    // JENKINS_URL is not enough to identify Jenkins. It can be easily used on a non-Jenkins job.
    return isNotBlank(system.envVariable("JENKINS_URL")) && isNotBlank(system.envVariable("EXECUTOR_NUMBER"));
  }
@Test
  public void isDetected() {
    setEnvVariable("JENKINS_URL", "http://foo");
    setEnvVariable("EXECUTOR_NUMBER", "12");
    assertThat(underTest.isDetected()).isTrue();

    setEnvVariable("JENKINS_URL", null);
    setEnvVariable("EXECUTOR_NUMBER", "12");
    assertThat(underTest.isDetected()).isFalse();

    setEnvVariable("JENKINS_URL", "http://foo");
    setEnvVariable("EXECUTOR_NUMBER", null);
    assertThat(underTest.isDetected()).isFalse();
  }