@Override
  public File newDir() {
    return createTempDir(tempDir.toPath()).toFile();
  }
@Test
  public void newDir_throws_ISE_if_name_is_not_valid() throws Exception {
    File rootTempFolder = temp.newFolder();
    DefaultTempFolder underTest = new DefaultTempFolder(rootTempFolder);

    assertThatThrownBy(() -> underTest.newDir(tooLong.toString()))
      .isInstanceOf(IllegalStateException.class)
      .hasMessageContaining("Failed to create temp directory");
  }