public long acquireTask() {
List<CustomTaskInstance> tasklist = findPooledTaskListByCustomId("reviewers", "abc");
Iterator taskIterator = tasklist.iterator();
CustomTaskInstance taskInstance = null;
long taskInstanceId = 0;
while (taskIterator.hasNext()) {
taskInstance = (CustomTaskInstance) taskIterator.next();
taskInstanceId = taskInstance.getId();
taskInstance.start();
taskInstance.setActorId("tom");
String customId = taskInstance.getCustomId();
assertEquals("abc", customId);
System.out.println(taskInstanceId);
}
return taskInstanceId;
}