### Question:
TimeZoneEncoderImpl implements TimeZoneEncoder { @VisibleForTesting byte[] encodeDate(ASSystemTime dateToEncode) { return systemTimeEncoder.toByteArray(dateToEncode); } @Inject  TimeZoneEncoderImpl(
			IntEncoder intEncoder, WCHAREncoder wcharEncoder, SystemTimeEncoder systemTimeEncoder); @Override byte[] encode(ASTimeZone asTimeZone);  }### Answer:
@Test public void testEncodeDateAtZero() { ASSystemTime systemTime = new ASSystemTime.FromDateBuilder().dateTime(new DateTime(0)).build(); byte[] expectedValue = systemTimeEncoder.toByteArray(systemTime); byte[] standardDate = serializer.encodeDate(systemTime); assertThat(standardDate).hasSize(SPEC_DATE_LENGHT).isEqualTo(expectedValue); }
@Test public void testEncodeLastTimeOf2016() { ASSystemTime systemTime = new ASSystemTime.FromDateBuilder() .dateTime(DateTime.parse("2016-12-31T23:59:59.999+00")).build(); byte[] expectedValue = systemTimeEncoder.toByteArray(systemTime); byte[] standardDate = serializer.encodeDate(systemTime); assertThat(standardDate).hasSize(SPEC_DATE_LENGHT).isEqualTo(expectedValue); }
@Test public void testEncodeEarlyTimeOf2222() { ASSystemTime systemTime = new ASSystemTime.FromDateBuilder() .dateTime(DateTime.parse("2222-01-01T00:00:00.000+00")).build(); byte[] expectedValue = systemTimeEncoder.toByteArray(systemTime); byte[] standardDate = serializer.encodeDate(systemTime); assertThat(standardDate).hasSize(SPEC_DATE_LENGHT).isEqualTo(expectedValue); }