static void wrapWithJetException(Exception exception) {
        // Exception is not JetException
        if (!(exception instanceof JetException)) {
            // Get the root cause and wrap it with JetException
            throw rethrow(exception);
        } else {
            // Just throw the JetException as is
            sneakyThrow(exception);
        }
    }
@Test
    public void wrapFileNotFoundException() {
        String message = "file not found";
        FileNotFoundException fileNotFound = new FileNotFoundException(message);
        assertThatThrownBy(() -> JetServiceBackend.wrapWithJetException(fileNotFound))
                .isInstanceOf(JetException.class)
                .hasRootCauseInstanceOf(FileNotFoundException.class)
                .hasMessageContaining(message);
    }