@Test public void cleansUpReferenceCacheOnEveryCommand() { when(listVersions.getMetaDataOrFail(EXEMPLARY_LIST_ID)) .thenReturn(new ListPropertyMetaData(null, randomUUID())); cut.execute(exemplaryAddToListCommand); cut.execute(exemplaryRemoveFromListCommand); cut.execute(exemlaryReplaceInListCommand); verify(referenceKeeper, times(3)).cleanReferenceCache(); }
@Override public void execute(final AddToList command) { referenceKeeper.cleanReferenceCache(); if (couldBeExecuted(command)) { executor.execute(command); } else { keepReferenceIfObservable(command.getValue()); } }
ListPropertyCommandFilter implements ListPropertyCommandExecutor { @Override public void execute(final AddToList command) { referenceKeeper.cleanReferenceCache(); if (couldBeExecuted(command)) { executor.execute(command); } else { keepReferenceIfObservable(command.getValue()); } } }
ListPropertyCommandFilter implements ListPropertyCommandExecutor { @Override public void execute(final AddToList command) { referenceKeeper.cleanReferenceCache(); if (couldBeExecuted(command)) { executor.execute(command); } else { keepReferenceIfObservable(command.getValue()); } } ListPropertyCommandFilter(final ListPropertyCommandExecutor executor,
            final TemporaryReferenceKeeper referenceKeeper, final ListPropertyMetaDataStore listVersions,
            final WeakObjectRegistry objectRegistry, final boolean useLocalVerision); }
ListPropertyCommandFilter implements ListPropertyCommandExecutor { @Override public void execute(final AddToList command) { referenceKeeper.cleanReferenceCache(); if (couldBeExecuted(command)) { executor.execute(command); } else { keepReferenceIfObservable(command.getValue()); } } ListPropertyCommandFilter(final ListPropertyCommandExecutor executor,
            final TemporaryReferenceKeeper referenceKeeper, final ListPropertyMetaDataStore listVersions,
            final WeakObjectRegistry objectRegistry, final boolean useLocalVerision); @Override void execute(final AddToList command); @Override void execute(final RemoveFromList command); @Override void execute(final ReplaceInList command); }
ListPropertyCommandFilter implements ListPropertyCommandExecutor { @Override public void execute(final AddToList command) { referenceKeeper.cleanReferenceCache(); if (couldBeExecuted(command)) { executor.execute(command); } else { keepReferenceIfObservable(command.getValue()); } } ListPropertyCommandFilter(final ListPropertyCommandExecutor executor,
            final TemporaryReferenceKeeper referenceKeeper, final ListPropertyMetaDataStore listVersions,
            final WeakObjectRegistry objectRegistry, final boolean useLocalVerision); @Override void execute(final AddToList command); @Override void execute(final RemoveFromList command); @Override void execute(final ReplaceInList command);  }