@SuppressWarnings("deprecation")
public void testDynamicTimeZone() {
TestAnnotatedMessages m = GWT.create(TestAnnotatedMessages.class);
Date date = new Date(Date.UTC(2010 - 1900, 1, 2, 3, 4, 5));
TimeZoneConstants timeZoneData = GWT.create(TimeZoneConstants.class);
String str = timeZoneData.americaLosAngeles();
TimeZoneInfo tzInfo = TimeZoneInfo.buildTimeZoneData(str);
TimeZone tz = TimeZone.createTimeZone(tzInfo);
assertEquals("in timezone: 2/1/2010, 7:04:05 PM", m.inTimezone(date, tz));
assertEquals("in timezone: 2/1/2010, 7:04:05 PM", m.inTimezoneAsSafeHtml(date, tz).asString());