}
public void testFunctionBlacklistMaintainerProviderBean_livePolicy() {
final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();
try {
final FunctionBlacklistMaintainerProviderBean bean = new FunctionBlacklistMaintainerProviderBean();
final ManageableFunctionBlacklistProvider provider = Mockito.mock(ManageableFunctionBlacklistProvider.class);
final ManageableFunctionBlacklist blacklist = Mockito.mock(ManageableFunctionBlacklist.class);
Mockito.when(provider.getBlacklist("BL_Foo")).thenReturn(blacklist);
bean.setBlacklistProvider(provider);
bean.setBlacklistPrefix("BL_");
bean.setBlacklistPolicy(new DefaultFunctionBlacklistPolicy(UniqueId.of("Test", "Foo"), 60, Arrays.asList(FunctionBlacklistPolicy.Entry.WILDCARD)));
final FunctionBlacklistMaintainer maintainer = bean.getUpdate("Foo");
maintainer.failedJobItem(JOB_ITEM);
Mockito.verify(blacklist).addBlacklistRule(new FunctionBlacklistRule(), 60);
} finally {
scheduler.shutdown();
}