public void testCheckQuotaUpdateDesiredConfigsUsedForFiltering() {
expectQuota(IResourceAggregate.build(new ResourceAggregate(6, 6, 6))).times(2);
expectTasks(createProdTask("foo", 2, 2, 2), createProdTask(JOB_NAME, 2, 2, 2)).times(2);
String updateId = "u1";
ITaskConfig config = taskConfig(2, 2, 2, true);
List<IJobUpdateSummary> summaries = buildJobUpdateSummaries(updateId, config.getJob());
IJobUpdate update = buildJobUpdate(summaries.get(0), config, 1, config, 1);
JobUpdate builder = update.newBuilder();
builder.getInstructions().setInitialState(ImmutableSet.<InstanceTaskConfig>of());
expect(jobUpdateStore.fetchJobUpdateSummaries(updateQuery(config.getJob().getRole())))
.andReturn(summaries).times(2);
expect(jobUpdateStore.fetchJobUpdate(updateId))
.andReturn(Optional.of(IJobUpdate.build(builder))).times(2);