@Test
public void fileExists() throws IOException {

    final Path path = PathFactory.newPath("file.gdst", "file:///contextpath/file.gdst");
    final GuidedDecisionTable52 table52 = new GuidedDecisionTable52();
    doReturn(mock(PackageDataModelOracle.class)).when(dataModelService).getDataModel(any());
    doReturn(table52).when(guidedDecisionTableEditorService).load(path);
    doReturn("id").when(sessionInfo).getId();
    doAnswer(new Answer() {
        @Override
        public Object answer(InvocationOnMock invocation) throws Throwable {
            final org.uberfire.java.nio.file.Path proposedPath = (org.uberfire.java.nio.file.Path) invocation.getArguments()[0];
            return Objects.equals("file.gdst export.xls", Paths.convert(proposedPath).getFileName());
        }
    }).when(ioService).exists(any());
    final XLSConversionResult convert = converter.convert(path);
    assertNotNull(convert);
    verify(decisionTableXLSService).create(pathArgumentCaptor.capture(),
                                           any(ByteArrayInputStream.class),
                                           any(),
                                           any());
    final Path value = pathArgumentCaptor.getValue();
    assertEquals("file.gdst export (1).xls", value.getFileName());
}