GuidedDecisionTableGraphEditorServiceImpl extends KieService<GuidedDecisionTableEditorGraphContent> implements GuidedDecisionTableGraphEditorService { @Override public GuidedDecisionTableEditorGraphModel load(final Path path) { try { final String content = ioService.readAllString(Paths.convert(path)); return GuidedDTGraphXMLPersistence.getInstance().unmarshal(content); } catch (Exception e) { throw ExceptionUtilities.handleException(e); } } GuidedDecisionTableGraphEditorServiceImpl(); @Inject  GuidedDecisionTableGraphEditorServiceImpl(final @Named("ioStrategy") IOService ioService,
                                                     final CopyService copyService,
                                                     final DeleteService deleteService,
                                                     final RenameService renameService,
                                                     final KieModuleService moduleService,
                                                     final VersionRecordService versionRecordService,
                                                     final GuidedDecisionTableEditorService dtableService,
                                                     final GuidedDecisionTableLinkManager dtableLinkManager,
                                                     final Event<ResourceOpenedEvent> resourceOpenedEvent,
                                                     final CommentedOptionFactory commentedOptionFactory,
                                                     final GuidedDTableResourceTypeDefinition resourceType,
                                                     final DotFileFilter dotFileFilter,
                                                     final SessionInfo sessionInfo); @Override Path create(final Path context,
                       final String fileName,
                       final GuidedDecisionTableEditorGraphModel model,
                       final String comment); @Override GuidedDecisionTableEditorGraphModel load(final Path path); @Override GuidedDecisionTableEditorGraphContent loadContent(final Path path); @Override Path save(final Path path,
                     final GuidedDecisionTableEditorGraphModel model,
                     final Metadata metadata,
                     final String comment); @Override void delete(final Path path,
                       final String comment); @Override Path rename(final Path path,
                       final String newName,
                       final String comment); @Override Path copy(final Path path,
                     final String newName,
                     final String comment); @Override Path copy(final Path path,
                     final String newName,
                     final Path targetDirectory,
                     final String comment); @Override List<Path> listDecisionTablesInPackage(final Path path);  }
@Test public void checkLoad() { final Path path = mock(Path.class); when(path.toURI()).thenReturn("file: when(ioService.readAllString(any(org.uberfire.java.nio.file.Path.class))).thenReturn(""); final GuidedDecisionTableEditorGraphModel model = service.load(path); verify(ioService, times(1)).readAllString(any(org.uberfire.java.nio.file.Path.class)); assertNotNull(model); }