### Question:
ApplicationEntity extends BaseEntity { void setCommands(@Nullable final Set<CommandEntity> commands) { this.commands.clear(); if (commands != null) { this.commands.addAll(commands); } } ApplicationEntity(); Optional<String> getType(); void setConfigs(@Nullable final Set<FileEntity> configs); void setDependencies(@Nullable final Set<FileEntity> dependencies); void setTags(@Nullable final Set<TagEntity> tags); @Override boolean equals(final Object o); @Override int hashCode(); static final String COMMANDS_ENTITY_GRAPH; static final String COMMANDS_DTO_ENTITY_GRAPH; static final String DTO_ENTITY_GRAPH; }### Answer:
@Test void testSetCommands() { final Set<CommandEntity> commandEntities = Sets.newHashSet(new CommandEntity()); this.a.setCommands(commandEntities); Assertions.assertThat(this.a.getCommands()).isEqualTo(commandEntities); this.a.setCommands(null); Assertions.assertThat(this.a.getCommands()).isEmpty(); }