EnergyManagement extends BaseOpenMessage { public static EnergyManagement requestDailyPower(String where, Version version) { return buildRequestPower(where, version, DAILY_POWER); } private  EnergyManagement(String value); static EnergyManagement requestInstantaneousPower(String where, Version version); static EnergyManagement requestDailyPower(String where, Version version); static EnergyManagement requestMonthlyPower(String where, Version version); static Func1<List<OpenSession>, List<OpenSession>> handlePowers(Action1<List<String>> onSuccess, Action0 onError);  }
@Test public void testRequestDaily() { assertEquals("invalid message", "*#18*51*54##", requestDailyPower("1", Version.MODEL_F523).getValue()); assertEquals("invalid message", "*#18*5255*54##", requestDailyPower("255", Version.MODEL_F523).getValue()); assertEquals("invalid message", "*#18*71#0*54##", requestDailyPower("1", Version.MODEL_F523_A).getValue()); assertEquals("invalid message", "*#18*7255#0*54##", requestDailyPower("255", Version.MODEL_F523_A).getValue()); }