@Test public void shouldInterruptWhenMarkerAsksForInterruption() { cleaner.setMarkers(Collections.singletonList(marker)); when(marker.mark(any(), any(UUID.class))).thenReturn(StepMarker.Result.INTERRUPTED); cleaner.execute(); verify(repository, never()).remove(refEq(Step.class), any(Expression.class)); }
public void setMarkers(List<StepMarker> markers) { this.markers = markers; }
PreparationCleaner implements MaintenanceTaskProcess { public void setMarkers(List<StepMarker> markers) { this.markers = markers; } }
PreparationCleaner implements MaintenanceTaskProcess { public void setMarkers(List<StepMarker> markers) { this.markers = markers; }  }
PreparationCleaner implements MaintenanceTaskProcess { public void setMarkers(List<StepMarker> markers) { this.markers = markers; }  @Override void performTask(); @Override Supplier<Boolean> condition(); @Override ScheduleFrequency getFrequency(); void setMarkers(List<StepMarker> markers); }
PreparationCleaner implements MaintenanceTaskProcess { public void setMarkers(List<StepMarker> markers) { this.markers = markers; }  @Override void performTask(); @Override Supplier<Boolean> condition(); @Override ScheduleFrequency getFrequency(); void setMarkers(List<StepMarker> markers);  }