package de.fred4jupiter.fredbet.util;

import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Locale;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class DateUtilsTest {

	private static final Logger LOG = LoggerFactory.getLogger(DateUtilsTest.class);

	@Test
	public void parseAndFormatTimestamp() {
		final String buildTimestamp = "2016-06-12 10:57 +0000";

		ZonedDateTime parsed = ZonedDateTime.parse(buildTimestamp, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm Z"));

		LOG.debug("formatted: {}", parsed
				.format(DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm zZ", Locale.getDefault()).withZone(ZoneId.of("Europe/Berlin"))));
	}
}

@@ -32,16 +32,51 @@
 .util;%0A%0A
+import static org.junit.Assert.*;%0A%0A
 import j
@@ -613,19 +613,15 @@
 %0A%0A%09%09
-LOG.debug(%22
+String 
 form
@@ -629,14 +629,10 @@
 tted
-: %7B%7D%22,
+ =
  par
@@ -756,16 +756,113 @@
 rlin%22)))
+;%0A%09%09LOG.debug(%22formatted: %7B%7D%22, formatted);%0A%09%09assertEquals(%2212.06.2016 12:57 MESZ+0200%22, formatted
 );%0A%09%7D%0A%7D%0A

update test