@Test
public void testAddErrorOnAgentErrorTrue() {

	AtomicBoolean callBackCalled = new AtomicBoolean(false);
	
	HashSet<AgentErrorCode> concernedAgentErrors = new HashSet<>();
	concernedAgentErrors.add(AgentErrorCode.UNEXPECTED);
	
	OutputMessage out = new OutputMessage();
	AgentError agentError = new AgentError(AgentErrorCode.UNEXPECTED);
	out.setAgentError(agentError);
	
	TokenLifecycleStrategy s = new ConfigurableTokenLifecycleStrategy(true, true, true, true, concernedAgentErrors);
	s.afterTokenCall(new TokenLifecycleStrategyCallback(null, null) {
		@Override
		public void addTokenError(String errorMessage, Exception exception) {
			callBackCalled.set(true);
		}
		
	}, new TokenWrapper(), out);
	Assert.assertTrue(callBackCalled.get());
}