void () { ProgressIndicatorEx ui = new ProgressIndicatorBase(); ProgressIndicatorEx indicator = new ProgressIndicatorBase(); indicator.addStateDelegate(new RelayUiToDelegateIndicator(ui)); assertNull(ui.getText()); indicator.setText("A"); assertEquals("A", ui.getText()); assertNull(ui.getText2()); indicator.setText2("B"); assertEquals("B", ui.getText2()); assertEquals(0.0, ui.getFraction()); indicator.setIndeterminate(false); indicator.setFraction(1); assertEquals(1.0, ui.getFraction()); assertThrows(IllegalStateException.class, () -> new RelayUiToDelegateIndicator(ui).addStateDelegate(new ProgressIndicatorBase())); }