Heating extends BaseOpenMessage { static Double toFahrenheit(Double value) { return formatDouble((value * 9.0/5.0) + 32.0); } private  Heating(String value, TemperatureScale scale); static Heating requestTemperature(String where, TemperatureScale scale); static Heating requestTemperature(String where); static Func1<OpenSession, OpenSession> handleTemperature(Action1<Double> onSuccess, Action0 onError);  }
@Test public void testToFahrenheit() { assertEquals("bad conversion", new Double(32.0), toFahrenheit(0.0)); assertEquals("bad conversion", new Double(68.0), toFahrenheit(20.0)); assertEquals("bad conversion", new Double(72.5), toFahrenheit(22.5)); assertEquals("bad conversion", new Double(100.76), toFahrenheit(38.2)); assertEquals("bad conversion", new Double(122.18), toFahrenheit(50.1)); assertEquals("bad conversion", new Double(10.04), toFahrenheit(-12.2)); assertEquals("bad conversion", new Double(9.86), toFahrenheit(-12.3)); assertEquals("bad conversion", new Double(-62.14), toFahrenheit(-52.3)); }