### Question:
TimeZoneUtils { public static String formatWithServerTimeZone(final Date date) { return FORMATTER.format(date, getTimeZone()); }  static Date convertFromServerTimeZone(final Date date); static Date convertToServerTimeZone(final Date date); static String formatWithServerTimeZone(final Date date); static TimeZone getTimeZone(); static DateTimeFormat internalFormatter(); final static DateTimeFormat FORMATTER; }### Answer:
@Test @PrepareForTest({TimeZoneUtils.class, DateTimeFormat.class}) public void testFormatWithServerTimeZone() { final Date date = mock(Date.class); final TimeZone timeZone = mock(TimeZone.class); final String expectedFormat = "01-01-1900"; mockStatic(TimeZoneUtils.class); when(TimeZoneUtils.getTimeZone()).thenReturn(timeZone); when(TimeZoneUtils.formatWithServerTimeZone(any(Date.class))).thenCallRealMethod(); when(dateTimeFormat.format(eq(date), eq(timeZone))).thenReturn(expectedFormat); final String actualFormat = TimeZoneUtils.formatWithServerTimeZone(date); assertEquals(expectedFormat, actualFormat); }