ConfigurationButtonFactory { public static ConfigurationButton createConfigurationButton(GazePlay gazePlay) { Dimension2D screenDimension = gazePlay.getCurrentScreenDimensionSupplier().get(); ConfigurationButton configurationButton = new ConfigurationButton(screenDimension); configurationButton.addEventHandler( MouseEvent.MOUSE_CLICKED, e -> gazePlay.onDisplayConfigurationManagement()); return configurationButton; }  static ConfigurationButton createConfigurationButton(GazePlay gazePlay);  }
@Test void shouldCreateConfigurationButton() { ConfigurationButton button = ConfigurationButtonFactory.createConfigurationButton(gazePlay); button.fireEvent(TestingUtils.clickOnTarget(button)); verify(gazePlay).onDisplayConfigurationManagement(); }