    @Test
    public void buildShouldWorkWhenAllFieldsAreGiven() {

        ImmutableSet<MessageProperty> props = ImmutableSet.of(MessageProperty.attachedMessages);

        SetError expected = new SetError(SetError.Type.ERROR, Optional.of("description"), Optional.of(props));

        SetError setError = SetError.builder()
                .type(SetError.Type.ERROR)
                .description("description")
                .properties(ImmutableSet.of(MessageProperty.attachedMessages))
                .build();

        assertThat(setError).isEqualToComparingFieldByField(expected);
    }