MappedList extends TransformationList<E, F> { @Override public E get(int index) { return mapped.get(index); } MappedList(ObservableList<? extends F> source, Function<F, E> mapper); @Override int getSourceIndex(int index); @Override E get(int index); @Override int size();  }
@Test public void replace() throws Exception { inputs.add("Mike"); inputs.add("Dave"); getChange(); getChange(); inputs.set(0, "Bob"); assertEquals("Hello Bob", outputs.get(0)); ListChangeListener.Change<? extends String> change = getChange(); assertTrue(change.wasReplaced()); assertEquals("Hello Mike", change.getRemoved().get(0)); assertEquals("Hello Bob", change.getAddedSubList().get(0)); }