@Test
  public void testTryGetCanonicalFileElseGetAbsoluteFileHandlesIOException() throws IOException {
    final File mockFile = mock(File.class);
    when(mockFile.getAbsoluteFile()).thenReturn(mock(File.class));
    when(mockFile.getCanonicalFile()).thenThrow(new IOException("Mock Exception"));
    final File file = IOUtils.tryGetCanonicalFileElseGetAbsoluteFile(mockFile);

    assertThat(file).isNotNull();
    assertThat(file.exists()).isFalse();
    InOrder inOrder = Mockito.inOrder(mockFile);
    inOrder.verify(mockFile).getCanonicalFile();
    inOrder.verify(mockFile).getAbsoluteFile();
  }
Gets a fully-qualified path anchored at root.
<p>

@param pathElements a String array containing the elements of the path.
@return a fully-qualified pathname as a String value.
geode-core/src/test/java/org/apache/geode/internal/util/IOUtilsJUnitTest.java