PreviousNextButtons extends SegmentedButton { @VisibleForTesting ToggleButton getPreviousButton() { return previousButton; } @SuppressWarnings("PMD.MissingStaticMethodInNonInstantiatableClass")  PreviousNextButtons(PreviousNext switchable);   }
@Test public void testClickPrevious() { clickOn(previousNextButtons.getPreviousButton()); WaitForAsyncUtils.waitForFxEvents(); assertEquals("Previous should have been called once", -1, previousNext.index); verifyThat("." + PreviousNextButtons.PREVIOUS_BUTTON_STYLE_CLASS, (ToggleButton t) -> !t .isSelected()); }