DittoHeaderInvalidException extends DittoRuntimeException { public static DittoHeaderInvalidException.Builder newCustomMessageBuilder(final String customMessage) { return new DittoHeaderInvalidException.Builder(customMessage); } 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 buildFromCustomMessage() { final String customMessage = "theCustomMessage"; final DittoHeaderInvalidException headerInvalidException = DittoHeaderInvalidException.newCustomMessageBuilder(customMessage) .build(); assertThat(headerInvalidException.getMessage()).isEqualTo(customMessage); assertThat(headerInvalidException.getDescription()).hasValue( "Verify that the header has the correct syntax and try again."); }