diff --git a/test/unit/org/openstreetmap/josm/tools/ExceptionUtilTest.java b/test/unit/org/openstreetmap/josm/tools/ExceptionUtilTest.java index f75af6a..15c382c 100644 --- a/test/unit/org/openstreetmap/josm/tools/ExceptionUtilTest.java +++ b/test/unit/org/openstreetmap/josm/tools/ExceptionUtilTest.java @@ -8,6 +8,7 @@ import java.net.HttpURLConnection; import java.net.SocketException; import java.net.URL; import java.net.UnknownHostException; +import java.util.TimeZone; import org.junit.BeforeClass; import org.junit.Test; @@ -21,6 +22,7 @@ import org.openstreetmap.josm.io.OsmApiException; import org.openstreetmap.josm.io.OsmApiInitializationException; import org.openstreetmap.josm.io.auth.CredentialsManager; import org.openstreetmap.josm.tools.date.DateUtils; +import org.openstreetmap.josm.tools.date.DateUtilsTest; /** * Unit tests of {@link ExceptionUtil} class. @@ -123,6 +125,10 @@ public class ExceptionUtilTest { ExceptionUtil.explainConflict(new OsmApiException(code, "header", ""))); assertEquals("Closing of changeset 1 failed
because it has already been closed.", ExceptionUtil.explainConflict(new OsmApiException(code, "The changeset 1 was closed at xxx", ""))); + assertEquals("Closing of changeset 1 failed
because it has already been closed on 2016-01-01 12:34:56.", + ExceptionUtil.explainConflict(new OsmApiException(code, "The changeset 1 was closed at 2016-01-01 12:34:56 UTC", ""))); + DateUtilsTest.setTimeZone(TimeZone.getTimeZone("Europe/Berlin")); + TimeZone.setDefault(TimeZone.getTimeZone("Europe/Berlin")); assertEquals("Closing of changeset 1 failed
because it has already been closed on 2016-01-01 13:34:56.", ExceptionUtil.explainConflict(new OsmApiException(code, "The changeset 1 was closed at 2016-01-01 12:34:56 UTC", ""))); }