@Test public void testInvalidMatchOn() throws Exception { final Rule actual = MAPPER.readValue(fixture("fixtures/rule_invalid_matchon.json"), Rule.class); assertThat(actual.getMatchOn().isPresent()).isFalse(); }
@JsonProperty(MATCH_ON) public Optional<String> getMatchOn() { return matchOn; }
Rule { @JsonProperty(MATCH_ON) public Optional<String> getMatchOn() { return matchOn; } }
Rule { @JsonProperty(MATCH_ON) public Optional<String> getMatchOn() { return matchOn; } @JsonCreator private  Rule(
      @JsonProperty(MAX_SIZE) @Nullable final Integer maxSize,
      @JsonProperty(MAX_DURATION) @Nullable final Duration maxDuration,
      @JsonProperty(MATCH_ON) @Nullable final String matchOn); }
Rule { @JsonProperty(MATCH_ON) public Optional<String> getMatchOn() { return matchOn; } @JsonCreator private  Rule(
      @JsonProperty(MAX_SIZE) @Nullable final Integer maxSize,
      @JsonProperty(MAX_DURATION) @Nullable final Duration maxDuration,
      @JsonProperty(MATCH_ON) @Nullable final String matchOn); static Builder builder(); @JsonProperty(MAX_SIZE) Optional<Integer> getMaxSize(); @JsonProperty(MAX_DURATION) Optional<Duration> getMaxDuration(); @JsonProperty(MATCH_ON) Optional<String> getMatchOn(); @JsonIgnore boolean isValid(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); }
Rule { @JsonProperty(MATCH_ON) public Optional<String> getMatchOn() { return matchOn; } @JsonCreator private  Rule(
      @JsonProperty(MAX_SIZE) @Nullable final Integer maxSize,
      @JsonProperty(MAX_DURATION) @Nullable final Duration maxDuration,
      @JsonProperty(MATCH_ON) @Nullable final String matchOn); static Builder builder(); @JsonProperty(MAX_SIZE) Optional<Integer> getMaxSize(); @JsonProperty(MAX_DURATION) Optional<Duration> getMaxDuration(); @JsonProperty(MATCH_ON) Optional<String> getMatchOn(); @JsonIgnore boolean isValid(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); static final String MAX_SIZE; static final String MAX_DURATION; static final String MATCH_ON; }