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("data") Object data,
            @JsonProperty("error") Integer error); static Builder builder(); static ApiError of(Throwable t); static ApiError of(String message); static Builder builderFromThrowable(Throwable t); String getMessage(); String getDetails(); Object getData(); Integer getError(); Response asBadRequestResponseJson(); Response asResponse(Status defaultStatusIfNoErrorCodeAlready, MediaType type); Response asResponse(MediaType type); Response asJsonResponse(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testSerializeApiErrorWithoutDetails() throws IOException { ApiError error = ApiError.builder() .message("explanatory message") .build(); assertEquals(asJson(error), jsonFixture("fixtures/api-error-no-details.json")); }