### Question:
ComplexKey { public static ComplexKey of(Object... components) { return new ComplexKey(components); } private  ComplexKey(Object[] components); static ComplexKey of(Object... components); static Object emptyObject(); static Object[] emptyArray(); @JsonValue JsonNode toJson();  }### Answer:
@Test public void dates_should_be_serialized_as_ISO_string() throws Exception { String json = mapper.writeValueAsString(ComplexKey.of(new Date(), Integer.valueOf(2))); assertThat(json, RegexMatcher.matches(ISO_8601_DATE_FORMAT_REGEX)); }