JsonParseException extends JsonRuntimeException { public static Builder newBuilder() { return new Builder(); } private  JsonParseException(@Nullable final String message,
            @Nullable final String description,
            @Nullable final Throwable cause,
            @Nullable final URI href);  JsonParseException(@Nullable final String message); static Builder newBuilder(); static final String ERROR_CODE; }
@Test public void getErrorCodeReturnsExpected() { final JsonParseException underTest = JsonParseException.newBuilder().build(); assertThat(underTest.getErrorCode()).isEqualTo(JsonParseException.ERROR_CODE); }
@Test public void getMessageReturnsNullIfNotExplicitlySet() { final JsonParseException underTest = JsonParseException.newBuilder().build(); assertThat(underTest.getMessage()).isNull(); }
@Test public void getDescriptionReturnsDefaultIfNotExplicitlySet() { final JsonParseException underTest = JsonParseException.newBuilder().build(); final Optional<String> description = underTest.getDescription(); assertThat(description).isPresent(); assertThat(description.get()).contains("Check if the JSON was valid"); }
@Test public void getDescriptionReturnsExpected() { final String description = "myDescription"; final JsonParseException underTest = JsonParseException.newBuilder().description(description).build(); assertThat(underTest.getDescription()).contains(description); }