DittoHeaderInvalidException extends DittoRuntimeException { public static DittoHeaderInvalidException.Builder newInvalidTypeBuilder(final String headerName, @Nullable final CharSequence headerValue, final String headerType) { return new DittoHeaderInvalidException.Builder(headerName, headerValue, headerType); } private  DittoHeaderInvalidException(final DittoHeaders dittoHeaders,
            @Nullable final String message,
            @Nullable final String description,
            @Nullable final Throwable cause,
            @Nullable final URI href); static DittoHeaderInvalidException.Builder newInvalidTypeBuilder(final String headerName,
            @Nullable final CharSequence headerValue, final String headerType); static DittoHeaderInvalidException.Builder newInvalidTypeBuilder(final HeaderDefinition headerDefinition,
            @Nullable final CharSequence headerValue, final String headerType); static DittoHeaderInvalidException.Builder newCustomMessageBuilder(final String customMessage); static DittoHeaderInvalidException fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); static final String ERROR_CODE; }
@Test public void buildForInvalidType() { final DittoHeaderInvalidException headerInvalidException = DittoHeaderInvalidException.newInvalidTypeBuilder("theHeaderName", "theValue", "theExpectedType") .build(); assertThat(headerInvalidException.getMessage()) .isEqualTo("The value 'theValue' of the header 'theHeaderName' is not a valid theExpectedType."); assertThat(headerInvalidException.getDescription()) .hasValue("Verify that the value of the header 'theHeaderName' is a valid 'theExpectedType' " + "and try again."); }