@Test
	public void testParseDouble() {
		RichGaugeRepository richGaugeRepository = mock(RichGaugeRepository.class);
		RichGaugeHandler handler = new RichGaugeHandler(richGaugeRepository, "'test'", -1);
		int i = 4;
		double val = handler.convertToDouble(i);
		assertEquals(4.0, val, 0.001);
		double d = 4;
		val = handler.convertToDouble(d);
		assertEquals(4.0, val, 0.001);
		float f = 4;
		val = handler.convertToDouble(f);
		assertEquals(4.0, val, 0.001);
		long l = 4L;
		val = handler.convertToDouble(l);
		assertEquals(4.0, val, 0.001);
		String s = "4.0";
		val = handler.convertToDouble(s);
		assertEquals(4.0, val, 0.001);
	}
@author David Turanski
@author Gary Russell
spring-xd-analytics/src/test/java/org/springframework/xd/analytics/metrics/integration/RichGaugeHandlerTests.java