### Question:
DefaultViewerSession extends ViewerSession { @Override public void init(final Metadata metadata, final Command callback) { init(s -> s.registerCanvasControl(MediatorsControl.class) .registerCanvasHandlerControl(SelectionControl.class, MultipleSelection.class), metadata, callback); } @Inject  DefaultViewerSession(final ManagedSession session,
                                final CanvasCommandManager<AbstractCanvasHandler> canvasCommandManager); @PostConstruct void constructInstance(); @Override void init(final Metadata metadata,
                     final Command callback); void init(final Consumer<ManagedSession> sessionControls,
                     final Metadata metadata,
                     final Command callback); @Override void open(); @Override void destroy(); @Override String getSessionUUID(); @Override AbstractCanvas getCanvas(); @Override AbstractCanvasHandler getCanvasHandler(); @Override CanvasCommandManager<AbstractCanvasHandler> getCommandManager(); @Override MediatorsControl<AbstractCanvas> getMediatorsControl(); @Override SelectionControl<AbstractCanvasHandler, Element> getSelectionControl();  }### Answer:
@Test @SuppressWarnings("unchecked") public void testInit() { Metadata metadata = mock(Metadata.class); Command command = mock(Command.class); tested.init(metadata, command); verify(managedSession, times(1)).registerCanvasControl(eq(MediatorsControl.class)); verify(managedSession, times(1)).registerCanvasHandlerControl(eq(SelectionControl.class), eq(MultipleSelection.class)); verify(managedSession, times(1)).init(eq(metadata), eq(command)); }