datastore.put(bulkData);
String[] kinds = { "TestKind1" };
SpreadsheetEntry ssEntry = SpreadsheetUtil.createBlunkSpreadsheet(authSubToken, kinds);
try {
ControllerTester tester = new ControllerTester();
Key controlKey =
TaskQueueUtil.prepareDumpControlKey("TestKind1", ssEntry.getKey(), authSubToken);
tester.request.setParameter("controlKey", KeyFactory.keyToString(controlKey));
String run = tester.start("/tasks/dump");
assertNull(run);
LocalTaskQueue ltq = LocalTaskQueueTestConfig.getLocalTaskQueue();
String defaultQueueName = QueueFactory.getDefaultQueue().getQueueName();
QueueStateInfo qsi = ltq.getQueueStateInfo().get(defaultQueueName);
List<TaskStateInfo> taskInfo = qsi.getTaskInfo();
assertThat(taskInfo.get(0).getUrl(), equalTo("/tasks/dump.gobo?controlKey="
+ KeyFactory.keyToString(controlKey)));
TaskQueueUtil.removeTasks();
// 2nd time.
run = tester.start("/tasks/dump");
assertNull(run);
ltq = LocalTaskQueueTestConfig.getLocalTaskQueue();
defaultQueueName = QueueFactory.getDefaultQueue().getQueueName();
qsi = ltq.getQueueStateInfo().get(defaultQueueName);