@Test
  public void fileForDirectoryThrowsIllegalArgumentException() throws Exception {
    // arrange
    File directoryIsFile = temporaryFolder.newFile("my.file");

    // act/assert
    assertThatThrownBy(() -> new PidFile(directoryIsFile, pidFileName).readPid())
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Nonexistent directory '" + directoryIsFile + "' specified");
  }
Functional integration tests for {@link PidFile}.

@since GemFire 8.2
geode-core/src/integrationTest/java/org/apache/geode/internal/process/PidFileIntegrationTest.java