@Test
public void testReserveError() {

	FunctionExecutionService f = getFunctionExecutionServiceForGridClientTest(null, null, new AgentCommunicationException("Reserve error"), null);
	
	FunctionExecutionServiceException e = null;
	try {
		f.getTokenHandle(new HashMap<>(), new HashMap<>(), true, null);
	} catch (FunctionExecutionServiceException e1) {
		e = e1;
	}
	Assert.assertNotNull(e);
	Assert.assertEquals("Communication error between the controller and the agent while reserving the agent token", e.getMessage());
}