### Question:
ApiError implements Serializable { public static Builder builder() { return new Builder(); } ApiError(String message);  ApiError(String message, String details);  ApiError(
            @JsonProperty("message") String message,
            @JsonProperty("details") String details,
            @JsonProperty("error") Integer error); static Builder builder(); static ApiError of(Throwable t); static ApiError of(String message); @Deprecated static Builder fromThrowable(Throwable t); static Builder builderFromThrowable(Throwable t); String getMessage(); String getDetails(); Integer getError(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); Response asBadRequestResponseJson(); Response asResponse(Status defaultStatus, MediaType type); Response asResponse(MediaType type); Response asJsonResponse();  }### Answer:
@Test public void testSerializeApiError() throws IOException { ApiError error = ApiError.builder() .message("explanatory message") .details("accompanying details") .build(); assertEquals(asJson(error), jsonFixture("fixtures/api-error-basic.json")); }
@Test public void testSerializeApiErrorWithoutDetails() throws IOException { ApiError error = ApiError.builder() .message("explanatory message") .build(); assertEquals(asJson(error), jsonFixture("fixtures/api-error-no-details.json")); }