class DefaultSlingSimulator implements SlingSimulatorBackend, SlingSimulator {

    <T extends SlingInstallable> Optional<T> createInstallableOrReport(final @NotNull SlingInstallableParams<T> params,
                                                                       final @NotNull PackageId parentPackageId,
                                                                       final @NotNull String jcrPath) {
        try {
            return Optional.of(params.createInstallable(parentPackageId, jcrPath));
        } catch (Exception e) {
            errorListener.onSlingCreateInstallableError(e, params.getInstallableType(),
                    parentPackageId, jcrPath);
            return Optional.empty();
        }
    }

}