assertResponse(INVALID_REQUEST, thrift.addInstances(config, LOCK.newBuilder(), SESSION));
}
@Test
public void testAddInstancesInstanceCollisionFailure() throws Exception {
ITaskConfig populatedTask = ITaskConfig.build(populatedTask());
AddInstancesConfig config = createInstanceConfig(populatedTask.newBuilder());
expectAuth(ROLE, true);
expect(cronJobManager.hasJob(JOB_KEY)).andReturn(false);
lockManager.validateIfLocked(LOCK_KEY, Optional.of(LOCK));
storageUtil.expectTaskFetch(Query.jobScoped(JOB_KEY).active());
expect(taskIdGenerator.generate(populatedTask, 1))