@Test
  public void verifySerializeDeserializeUserTimeZone() throws Exception {
    ObjectMapper objectMapper = ObjectMapperFactory.createObjectMapper();
    Instant date = Instant.now();

    JobAuthorization jobAuthorization =
        JobAuthorization.builder().setState(JobAuthorization.State.INITIAL).build();

    PortabilityJob job =
        PortabilityJob.builder()
            .setState(State.NEW)
            .setExportService("fooService")
            .setImportService("barService")
            .setTransferDataType(PHOTOS)
            .setCreatedTimestamp(date)
            .setLastUpdateTimestamp(date.plusSeconds(120))
            .setJobAuthorization(jobAuthorization)
            .setUserTimeZone(TimeZone.getTimeZone("America/Costa_Rica"))
            .build();

    String serializedJob = objectMapper.writeValueAsString(job);
    PortabilityJob deserializedJob = objectMapper.readValue(serializedJob, PortabilityJob.class);
    assertThat(deserializedJob).isEqualTo(job);
  }
Tests serialization and deserialization of a {@link PortabilityJob}.
portability-spi-cloud/src/test/java/org/datatransferproject/spi/cloud/types/PortabilityJobTest.java