@Test public void testGetLoadInformation() throws Exception { Long expected = new Long(91); given(mBeanServerConnection.getAttribute(jmsQueue, "QueueSize")).willReturn(expected); Map<String, Long> result = underTest.getLoadInformation(); assertEquals(expected, result.get("loadInformation")); }
@ResponseBody @RequestMapping(value = "/loadinformation", method = RequestMethod.GET) public Map<String, Long> getLoadInformation() { Map<String, Long> loadInformation = new HashMap<>(); buildConnection(); try { Long jmsQueueSize = (Long) jmsQueueConnection.getAttribute(jmsQueue, "QueueSize"); loadInformation.put("loadInformation", jmsQueueSize); } catch (Exception e) { logger.error("Exception while monitoring queue sizes", e); } return loadInformation; }
LoadInformationController { @ResponseBody @RequestMapping(value = "/loadinformation", method = RequestMethod.GET) public Map<String, Long> getLoadInformation() { Map<String, Long> loadInformation = new HashMap<>(); buildConnection(); try { Long jmsQueueSize = (Long) jmsQueueConnection.getAttribute(jmsQueue, "QueueSize"); loadInformation.put("loadInformation", jmsQueueSize); } catch (Exception e) { logger.error("Exception while monitoring queue sizes", e); } return loadInformation; } }
LoadInformationController { @ResponseBody @RequestMapping(value = "/loadinformation", method = RequestMethod.GET) public Map<String, Long> getLoadInformation() { Map<String, Long> loadInformation = new HashMap<>(); buildConnection(); try { Long jmsQueueSize = (Long) jmsQueueConnection.getAttribute(jmsQueue, "QueueSize"); loadInformation.put("loadInformation", jmsQueueSize); } catch (Exception e) { logger.error("Exception while monitoring queue sizes", e); } return loadInformation; }  }
LoadInformationController { @ResponseBody @RequestMapping(value = "/loadinformation", method = RequestMethod.GET) public Map<String, Long> getLoadInformation() { Map<String, Long> loadInformation = new HashMap<>(); buildConnection(); try { Long jmsQueueSize = (Long) jmsQueueConnection.getAttribute(jmsQueue, "QueueSize"); loadInformation.put("loadInformation", jmsQueueSize); } catch (Exception e) { logger.error("Exception while monitoring queue sizes", e); } return loadInformation; }  @ResponseBody @RequestMapping(value = "/loadinformation", method = RequestMethod.GET) Map<String, Long> getLoadInformation(); }
LoadInformationController { @ResponseBody @RequestMapping(value = "/loadinformation", method = RequestMethod.GET) public Map<String, Long> getLoadInformation() { Map<String, Long> loadInformation = new HashMap<>(); buildConnection(); try { Long jmsQueueSize = (Long) jmsQueueConnection.getAttribute(jmsQueue, "QueueSize"); loadInformation.put("loadInformation", jmsQueueSize); } catch (Exception e) { logger.error("Exception while monitoring queue sizes", e); } return loadInformation; }  @ResponseBody @RequestMapping(value = "/loadinformation", method = RequestMethod.GET) Map<String, Long> getLoadInformation();  }