@Autowired
private Config config;
@PostConstruct
public void init() {
AgentManagerService agentManagerService = mock(AgentManagerService.class);
Map<String, MutableInt> countMap = new HashMap<String, MutableInt>(1);
countMap.put(config.getRegion(), new MutableInt(3));
when(agentManagerService.getAvailableAgentCountMap(userContext.getCurrentUser())).thenReturn(countMap);
ReflectionTestUtils.setField(this, "agentManagerService", agentManagerService);
}