class WorkspaceFacade implements Workspace {

    @SuppressWarnings("WeakerAccess")
    public static <S extends Session> @Nullable Workspace
    findBestWrapper(final @Nullable Workspace workspace,
                    final @NotNull SessionFacade<S> sessionFacade) {
        if (workspace instanceof JackrabbitWorkspace) {
            return new JackrabbitWorkspaceFacade<>((JackrabbitWorkspace) workspace, sessionFacade);
        } else if (workspace != null) {
            return new JcrWorkspaceFacade<>(workspace, sessionFacade);
        } else {
            return null;
        }
    }

    @SuppressWarnings("WeakerAccess") public  WorkspaceFacade(final @NotNull W delegate, final @NotNull SessionFacade<S> session);

}