### Question:
SessionPreviewImpl extends AbstractSessionViewer<S> implements SessionDiagramPreview<S>,
                   CommandRequestLifecycle { @PostConstruct public void init() { requestLifecycle.listen(() -> this); } @Inject @SuppressWarnings("unchecked")  SessionPreviewImpl(final DefinitionUtils definitionUtils,
                              final GraphUtils graphUtils,
                              final ShapeManager shapeManager,
                              final TextPropertyProviderFactory textPropertyProviderFactory,
                              final MouseRequestLifecycle requestLifecycle,
                              final @Any ManagedInstance<WiresCanvas> canvases,
                              final @Any ManagedInstance<PreviewLienzoPanel> canvasPanels,
                              final @Any ManagedInstance<BaseCanvasHandler> canvasHandlers,
                              final @Any ManagedInstance<MediatorsControl<AbstractCanvas>> mediatorControls,
                              final @Any @SingleSelection ManagedInstance<SelectionControl<AbstractCanvasHandler, Element>> selectionControls,
                              final @Any ManagedInstance<CanvasCommandFactory> canvasCommandFactories,
                              final @Any ManagedInstance<CanvasCommandManager<AbstractCanvasHandler>> canvasCommandManagers,
                              final WidgetWrapperView view,
                              final StunnerPreferencesRegistries preferencesRegistries); @PostConstruct void init(); @Override void start(); @Override void rollback(); @Override void complete(); SessionPreviewImpl setCommandAllowed(final Predicate<Command<AbstractCanvasHandler, CanvasViolation>> isCommandAllowed); CanvasCommandManager<AbstractCanvasHandler> getCommandManager(); SessionPreviewCanvasHandlerProxy getCanvasHandler(); @Override WiresCanvas getCanvas(); CanvasCommandFactory getCommandFactory(); @Override @SuppressWarnings("unchecked") MediatorsControl<AbstractCanvas> getMediatorsControl();  }### Answer:
@Test @SuppressWarnings("unchecked") public void testInit() { preview.init(); ArgumentCaptor<Supplier> targetCaptor = ArgumentCaptor.forClass(Supplier.class); verify(requestLifecycle, times(1)).listen(targetCaptor.capture()); Supplier target = targetCaptor.getValue(); assertEquals(preview, target.get()); }