@Test
	public void gaugeRetrievalSucceedsWithCorrectValues() throws Exception {

		when(richGaugeRepository.findOne("mygauge")).thenReturn(
				new RichGauge("mygauge", 57.0, -1.0, 56.0, 57.0, 55.0, 2));

		mockMvc.perform(get("/metrics/rich-gauges/mygauge").accept(MediaType.APPLICATION_JSON)).andExpect(
				status().isOk()).andExpect(jsonPath("$.name").value("mygauge")).andExpect(
						jsonPath("$.value").value(57.0)).andExpect(jsonPath("$.average").value(56.0)).andExpect(
								jsonPath("$.max").value(57.0)).andExpect(jsonPath("$.min").value(55.0));
	}
@author Luke Taylor
@author Ilayaperumal Gopinathan
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/rest/metrics/RichGaugeControllerIntegrationTests.java