DataEditor implements Widget { void back(){ updateState(dataEditorState.back()); } DataEditor(AttributeVisualisationMappingBuilder attributeVisualisationMappingBuilder, UniformDesign uniformDesign, BiFunction<Node, FactoryBase<?,?>,Node> dataVisualisationCustomizer);  DataEditor(AttributeVisualisationMappingBuilder attributeVisualisationMappingBuilder, UniformDesign uniformDesign); ReadOnlyObjectProperty<FactoryBase<?,?>> editData(); void navigate(FactoryBase<?,?> newValue); void navigateBack(FactoryBase<?,?> newValue); void edit(FactoryBase<?,?> newValue); void setHistory(List<FactoryBase<?,?>> data); void reset(); @Override Node createContent(); SimpleBooleanProperty historyNavigationVisibleProperty(); @Override void destroy();  }
@Test public void testBack() { UniformDesign uniformDesign = UniformDesignBuilder.build(); DataEditor dataEditor = new DataEditor(new AttributeVisualisationMappingBuilder(new ArrayList<>()),uniformDesign); ExampleData1 exampleData1 = new ExampleData1(); ExampleData1 exampleData2 = new ExampleData1(); ExampleData1 exampleData3 = new ExampleData1(); ExampleData1 exampleData4 = new ExampleData1(); dataEditor.navigate(exampleData1); dataEditor.navigate(exampleData2); dataEditor.navigate(exampleData3); dataEditor.navigate(exampleData4); dataEditor.back(); Assertions.assertEquals(exampleData3,dataEditor.editData.get()); dataEditor.back(); Assertions.assertEquals(exampleData2,dataEditor.editData.get()); dataEditor.back(); Assertions.assertEquals(exampleData1,dataEditor.editData.get()); dataEditor.back(); Assertions.assertEquals(exampleData1,dataEditor.editData.get()); dataEditor.back(); Assertions.assertEquals(exampleData1,dataEditor.editData.get()); }