@Test
	public void testExistingCounterRetrieval() throws Exception {
		Map<String, Double> values = new HashMap<String, Double>();
		values.put("VMW", 13.0);
		values.put("GOOG", 23.0);
		when(fieldValueCounterRepository.findOne("iamthere")).thenReturn(new FieldValueCounter("iamthere", values));

		mockMvc.perform(get("/metrics/field-value-counters/iamthere"))//
		.andExpect(status().isOk())//
		.andExpect(jsonPath("$.name").value("iamthere"))//
		.andExpect(jsonPath("$.counts['VMW']").value(13.0));
	}
Tests proper behavior of {@link FieldValueCountersController}.

@author Eric Bottard
@author Ilayaperumal Gopinathan
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/rest/metrics/FieldValueCountersControllerIntegrationTests.java