executor = Executors.newSingleThreadScheduledExecutor(threadFactory);
testExecutor = Executors.newCachedThreadPool(threadFactory);
addTearDown(new TearDown() {
@Override
public void tearDown() throws Exception {
new ExecutorServiceShutdown(executor, Amount.of(1L, Time.SECONDS)).execute();
new ExecutorServiceShutdown(testExecutor, Amount.of(1L, Time.SECONDS)).execute();
}
});
maintenanceController = createMock(MaintenanceController.class);
offerAcceptor = createMock(new Clazz<Function<Offer, Optional<TaskInfo>>>() { });
OfferReturnDelay returnDelay = new OfferReturnDelay() {