@Test
public void testClose() {

    doAnswer((Answer<Void>) (InvocationOnMock invocation) -> {
        Object[] args = invocation.getArguments();
        listener = (SetChangeListener<DockableEntry<Object, DockableData>>) args[0];
        return null;
    }).when(dockingAreaContainer).addDockableSetChangeListener(any());
    try (DockableDataModifiedManager testee = new DockableDataModifiedManager(dockingAreaContainer)) {
        listener.elementAdded(new SetChangeEvent<>(dockables, dockableEntry));
        assertFalse(dockableData.isModified());
        testDockable.modify();
        assertTrue(dockableData.isModified());
        testDockable.save();
        assertFalse(dockableData.isModified());
    }
    verify(dockingAreaContainer).removeDockableSetChangeListener(listener);
    assertFalse(dockableData.isModified());
    testDockable.modify();
    assertFalse(dockableData.isModified());
    testDockable.save();
    assertFalse(dockableData.isModified());
}