@Test
	public void testExistingCounterRetrieval() throws Exception {
		when(counterRepository.findOne("iamthere")).thenReturn(new Counter("iamthere", 12L));

		mockMvc.perform(get("/metrics/counters/iamthere"))//
		.andExpect(status().isOk())//
		.andExpect(jsonPath("$.name").value("iamthere"))//
		.andExpect(jsonPath("$.value").value(12));
	}
Tests proper behavior of {@link CountersController}.

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