@Test
public void testCheckOutputSpecsAlreadyExists() throws IOException {

  // Setup configuration.
  ghfs.mkdirs(TEST_OUTPUT_PATH);
  IOException thrown =
      assertThrows(
          IOException.class, () -> outputFormat.checkOutputSpecs(mockTaskAttemptContext));
  assertThat(thrown)
      .hasMessageThat()
      .contains("The output path '" + TEST_OUTPUT_PATH + "' already exists.");
}