@Test void canSetTags() { final CriterionEntity entity = new CriterionEntity(); Assertions.assertThat(entity.getTags()).isEmpty(); entity.setTags(null); Assertions.assertThat(entity.getTags()).isEmpty(); final Set<TagEntity> tags = Sets.newHashSet(); entity.setTags(tags); Assertions.assertThat(entity.getTags()).isEmpty(); tags.add(new TagEntity(UUID.randomUUID().toString())); entity.setTags(tags); Assertions.assertThat(entity.getTags()).isEqualTo(tags); }
public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } }
CriterionEntity extends IdEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } }
CriterionEntity extends IdEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } CriterionEntity(
        @Nullable final String uniqueId,
        @Nullable final String name,
        @Nullable final String version,
        @Nullable final String status,
        @Nullable final Set<TagEntity> tags
    ); }
CriterionEntity extends IdEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } CriterionEntity(
        @Nullable final String uniqueId,
        @Nullable final String name,
        @Nullable final String version,
        @Nullable final String status,
        @Nullable final Set<TagEntity> tags
    ); Optional<String> getUniqueId(); void setUniqueId(@Nullable final String uniqueId); Optional<String> getName(); void setName(@Nullable final String name); Optional<String> getVersion(); void setVersion(@Nullable final String version); Optional<String> getStatus(); void setStatus(@Nullable final String status); void setTags(@Nullable final Set<TagEntity> tags); @Override boolean equals(final Object o); @Override int hashCode(); }
CriterionEntity extends IdEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } CriterionEntity(
        @Nullable final String uniqueId,
        @Nullable final String name,
        @Nullable final String version,
        @Nullable final String status,
        @Nullable final Set<TagEntity> tags
    ); Optional<String> getUniqueId(); void setUniqueId(@Nullable final String uniqueId); Optional<String> getName(); void setName(@Nullable final String name); Optional<String> getVersion(); void setVersion(@Nullable final String version); Optional<String> getStatus(); void setStatus(@Nullable final String status); void setTags(@Nullable final Set<TagEntity> tags); @Override boolean equals(final Object o); @Override int hashCode();  }