Header { public static Builder builder() { return new Builder(); } private  Header(String name, Optional<String> value); static Builder builder(); @JsonCreator static Header from(List<String> header); String getName(); Optional<String> getValue();  }
@Test public void buildShouldThrowWhenNameIsNotGiven() { assertThatThrownBy(() -> Header.builder().build()).isInstanceOf(IllegalStateException.class); }