SlotStatusRepresentation { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("SlotStatusRepresentation"); sb.append("{id=").append(id); sb.append(", shortId='").append(shortId).append('\''); sb.append(", self=").append(self); sb.append(", externalUri=").append(externalUri); sb.append(", instanceId=").append(instanceId); sb.append(", location=").append(location); sb.append(", shortLocation=").append(shortLocation); sb.append(", binary='").append(binary).append('\''); sb.append(", shortBinary='").append(shortBinary).append('\''); sb.append(", config='").append(config).append('\''); sb.append(", shortConfig='").append(shortConfig).append('\''); sb.append(", status='").append(status).append('\''); sb.append(", version='").append(version).append('\''); sb.append(", statusMessage='").append(statusMessage).append('\''); sb.append(", installPath='").append(installPath).append('\''); sb.append(", resources='").append(resources).append('\''); sb.append(", expectedBinary='").append(expectedBinary).append('\''); sb.append(", expectedConfig='").append(expectedConfig).append('\''); sb.append(", expectedStatus='").append(expectedStatus).append('\''); sb.append('}'); return sb.toString(); } @JsonCreator  SlotStatusRepresentation(@JsonProperty("id") UUID id,
            @JsonProperty("shortId") String shortId,
            @JsonProperty("self") URI self,
            @JsonProperty("externalUri") URI externalUri,
            @JsonProperty("instanceId") String instanceId,
            @JsonProperty("location") String location,
            @JsonProperty("shortLocation") String shortLocation,
            @JsonProperty("binary") String binary,
            @JsonProperty("shortBinary") String shortBinary,
            @JsonProperty("config") String config,
            @JsonProperty("shortConfig") String shortConfig,
            @JsonProperty("status") String status,
            @JsonProperty("version") String version,
            @JsonProperty("statusMessage") String statusMessage,
            @JsonProperty("installPath") String installPath,
            @JsonProperty("resources") Map<String, Integer> resources,
            @JsonProperty("expectedBinary") String expectedBinary,
            @JsonProperty("expectedConfig") String expectedConfig,
            @JsonProperty("expectedStatus") String expectedStatus); static Function<SlotStatus, SlotStatusRepresentation> fromSlotStatus(List<SlotStatus> slotStatuses, Repository repository); static Function<SlotStatus, SlotStatusRepresentation> fromSlotStatus(final SlotStatusRepresentationFactory factory); static SlotStatusRepresentation from(SlotStatus status); static SlotStatusRepresentation from(SlotStatus slotStatus, int shortIdPrefixSize, Repository repository); @JsonProperty @NotNull(message = "is missing") UUID getId(); @JsonProperty @NotNull(message = "is missing") String getShortId(); @JsonProperty @NotNull(message = "is missing") URI getSelf(); @JsonProperty @NotNull(message = "is missing") URI getExternalUri(); @JsonProperty String getInstanceId(); @JsonProperty @NotNull(message = "is missing") String getLocation(); @JsonProperty String getShortLocation(); @JsonProperty @NotNull(message = "is missing") String getBinary(); @JsonProperty @NotNull(message = "is missing") String getShortBinary(); @JsonProperty @NotNull(message = "is missing") String getConfig(); @JsonProperty @NotNull(message = "is missing") String getShortConfig(); @JsonProperty String getStatus(); @JsonProperty String getVersion(); @JsonProperty String getStatusMessage(); @JsonProperty String getInstallPath(); @JsonProperty Map<String, Integer> getResources(); @JsonProperty String getExpectedBinary(); @JsonProperty String getExpectedConfig(); @JsonProperty String getExpectedStatus(); SlotStatus toSlotStatus(String instanceId); String getExternalHost(); String getInternalHost(); String getInternalIp(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testJsonDecode() throws Exception { String json = Resources.toString(Resources.getResource("slot-status.json"), Charsets.UTF_8); SlotStatusRepresentation actual = codec.fromJson(json); assertEquals(actual, expected); }