@Test
void shouldBuildLanguageChooser() throws InterruptedException {

    Platform.runLater(() -> {
        ConfigurationContext context = new ConfigurationContext(mockGazePlay);
        StringProperty languageProperty = new SimpleStringProperty("eng");
        StringProperty countryProperty = new SimpleStringProperty("GB");
        when(mockConfig.getLanguage()).thenReturn(languageProperty.getValue());
        when(mockConfig.getCountry()).thenReturn(countryProperty.getValue());
        when(mockConfig.getLanguageProperty()).thenReturn(languageProperty);
        when(mockConfig.getCountryProperty()).thenReturn(countryProperty);
        when(mockContext.getGazePlay()).thenReturn(mockGazePlay);
        MenuButton result = context.buildLanguageChooser(mockConfig, context);
        assertEquals(23, result.getItems().size());
        result.getItems().get(1).fire();
        ImageView image = (ImageView) result.getGraphic();
        assertTrue(image.getImage().getUrl().contains("Arab"));
        assertEquals("ara", languageProperty.getValue());
    });
    TestingUtils.waitForRunLater();
}