### Question:
Rfc3339DateJsonAdapter extends JsonAdapter<Date> { @Override public synchronized Date fromJson(JsonReader reader) throws IOException { if (reader.peek() == JsonReader.Token.NULL) { return reader.nextNull(); } String string = reader.nextString(); return Iso8601Utils.parse(string); }  @Override synchronized Date fromJson(JsonReader reader); @Override synchronized void toJson(JsonWriter writer, Date value);  }### Answer:
@Test public void fromJsonWithTwoDigitMillis() throws Exception { assertThat(adapter.fromJson("\"1985-04-12T23:20:50.52Z\"")) .isEqualTo(newDate(1985, 4, 12, 23, 20, 50, 520, 0)); }
@Test public void fromJson() throws Exception { assertThat(adapter.fromJson("\"1970-01-01T00:00:00.000Z\"")) .isEqualTo(newDate(1970, 1, 1, 0, 0, 0, 0, 0)); assertThat(adapter.fromJson("\"1985-04-12T23:20:50.520Z\"")) .isEqualTo(newDate(1985, 4, 12, 23, 20, 50, 520, 0)); assertThat(adapter.fromJson("\"1996-12-19T16:39:57-08:00\"")) .isEqualTo(newDate(1996, 12, 19, 16, 39, 57, 0, -8 * 60)); assertThat(adapter.fromJson("\"1990-12-31T23:59:60Z\"")) .isEqualTo(newDate(1990, 12, 31, 23, 59, 59, 0, 0)); assertThat(adapter.fromJson("\"1990-12-31T15:59:60-08:00\"")) .isEqualTo(newDate(1990, 12, 31, 15, 59, 59, 0, -8 * 60)); assertThat(adapter.fromJson("\"1937-01-01T12:00:27.870+00:20\"")) .isEqualTo(newDate(1937, 1, 1, 12, 0, 27, 870, 20)); }