@Test
	public void testUpdateRecurringJobFromQueue() throws LuaScriptException {
		String jid = addRecurringJob();

		String json = getRecurringJob(jid);
		Map<String, Object> job = JsonHelper.parseMap(json);
		assertEquals(jid, job.get("jid").toString());
		assertEquals(TEST_QUEUE, job.get("queue").toString());
		assertEquals("recur", job.get("state").toString());

		List<String> keys = new ArrayList<String>();
		List<String> args = Arrays.asList("update", jid, "queue",
				"another-queue");
		long result = (Long) _luaScript.callScript(this.scriptName(), keys,
				args);
		assertEquals(1, result);

		// Reget the job
		json = getRecurringJob(jid);
		job = JsonHelper.parseMap(json);
		assertEquals("another-queue", job.get("queue").toString());

		// Test that this jid does not exist in test-queue, but does exist in
		// another-queue
		List<String> noKeys = new ArrayList<String>();
		List<String> queueArgs = Arrays.asList(
				JQlessClient.getCurrentSeconds(), TEST_QUEUE);

		json = (String) _luaScript.callScript("queues.lua", noKeys, queueArgs);
		Map<String, Object> queueDetails = JsonHelper.parseMap(json);
		for (String key : queueDetails.keySet()) {
			if (!key.equals("name")) {
				assertEquals(0, queueDetails.get(key));
			}
		}

		queueArgs = Arrays.asList(JQlessClient.getCurrentSeconds(),
				"another-queue");

		json = (String) _luaScript.callScript("queues.lua", noKeys, queueArgs);
		queueDetails = JsonHelper.parseMap(json);
		int totalJobs = 0;
		for (String key : queueDetails.keySet()) {
			if (!key.equals("name")) {
				totalJobs += (Integer) queueDetails.get(key);
			}
		}
		assertEquals(1, totalJobs);

		removeRecurringJob(jid);
	}