### Question:
PreviewLienzoPanel extends DelegateLienzoPanel<StunnerLienzoBoundsPanel> { @PostConstruct public void init() { panel.setPanelBuilder((width, height) -> new PreviewPanel(width.orElse(300), height.orElse(150))); } @Inject  PreviewLienzoPanel(final StunnerLienzoBoundsPanel panel); @PostConstruct void init(); PreviewLienzoPanel observe(final ScrollableLienzoPanel panel);  }### Answer:
@Test @SuppressWarnings("unchecked") public void testInit() { tested.init(); ArgumentCaptor<BiFunction> builderCaptor = ArgumentCaptor.forClass(BiFunction.class); verify(panel, times(1)).setPanelBuilder(builderCaptor.capture()); BiFunction<OptionalInt, OptionalInt, LienzoBoundsPanel> builder = builderCaptor.getValue(); LienzoBoundsPanel result = builder.apply(OptionalInt.of(300), OptionalInt.of(450)); assertTrue(result instanceof PreviewPanel); assertEquals(300, result.getWidthPx()); assertEquals(450, result.getHeightPx()); }