@Test
  public void verifyFromMapEqualsToMap() {
    PortabilityJob job = PortabilityJob.fromMap(MANDATORY_FIELDS);
    Map<String, Object> expectedMap = ImmutableMap.<String, Object>builder()
        .putAll(MANDATORY_FIELDS)
        .put("JOB_STATE", "NEW")
        .put("ENCRYPTION_SCHEME", "jwe")
        .put("TRANSFER_MODE", "DATA_TRANSFER")
        .build();

    assertThat(job.toMap()).containsExactlyEntriesIn(expectedMap);
  }
Tests serialization and deserialization of a {@link PortabilityJob}.
portability-spi-cloud/src/test/java/org/datatransferproject/spi/cloud/types/PortabilityJobTest.java