@Test void fromShouldThrowWhenStorageStrategyAddedIsNull() { assertThatThrownBy(() -> StorageStrategyChangedDTO.from(null)) .isInstanceOf(NullPointerException.class); }
static StorageStrategyChangedDTO from(StorageStrategyChanged storageStrategyChanged, String type) { Preconditions.checkNotNull(storageStrategyChanged); StorageStrategy storageStrategy = storageStrategyChanged.getStorageStrategy(); return new StorageStrategyChangedDTO( storageStrategyChanged.eventId().serialize(), storageStrategyChanged.getAggregateId().asAggregateKey(), type, storageStrategy.name()); }
StorageStrategyChangedDTO implements EventDTO { static StorageStrategyChangedDTO from(StorageStrategyChanged storageStrategyChanged, String type) { Preconditions.checkNotNull(storageStrategyChanged); StorageStrategy storageStrategy = storageStrategyChanged.getStorageStrategy(); return new StorageStrategyChangedDTO( storageStrategyChanged.eventId().serialize(), storageStrategyChanged.getAggregateId().asAggregateKey(), type, storageStrategy.name()); } }
StorageStrategyChangedDTO implements EventDTO { static StorageStrategyChangedDTO from(StorageStrategyChanged storageStrategyChanged, String type) { Preconditions.checkNotNull(storageStrategyChanged); StorageStrategy storageStrategy = storageStrategyChanged.getStorageStrategy(); return new StorageStrategyChangedDTO( storageStrategyChanged.eventId().serialize(), storageStrategyChanged.getAggregateId().asAggregateKey(), type, storageStrategy.name()); } @JsonCreator  StorageStrategyChangedDTO(
            @JsonProperty("eventId") int eventId,
            @JsonProperty("aggregateKey") String aggregateKey,
            @JsonProperty("type") String type,
            @JsonProperty("storageStrategy") String storageStrategy); }
StorageStrategyChangedDTO implements EventDTO { static StorageStrategyChangedDTO from(StorageStrategyChanged storageStrategyChanged, String type) { Preconditions.checkNotNull(storageStrategyChanged); StorageStrategy storageStrategy = storageStrategyChanged.getStorageStrategy(); return new StorageStrategyChangedDTO( storageStrategyChanged.eventId().serialize(), storageStrategyChanged.getAggregateId().asAggregateKey(), type, storageStrategy.name()); } @JsonCreator  StorageStrategyChangedDTO(
            @JsonProperty("eventId") int eventId,
            @JsonProperty("aggregateKey") String aggregateKey,
            @JsonProperty("type") String type,
            @JsonProperty("storageStrategy") String storageStrategy); @JsonIgnore StorageStrategyChanged toEvent(); int getEventId(); String getAggregateKey(); String getType(); String getStorageStrategy(); @Override final boolean equals(Object o); @Override final int hashCode(); }
StorageStrategyChangedDTO implements EventDTO { static StorageStrategyChangedDTO from(StorageStrategyChanged storageStrategyChanged, String type) { Preconditions.checkNotNull(storageStrategyChanged); StorageStrategy storageStrategy = storageStrategyChanged.getStorageStrategy(); return new StorageStrategyChangedDTO( storageStrategyChanged.eventId().serialize(), storageStrategyChanged.getAggregateId().asAggregateKey(), type, storageStrategy.name()); } @JsonCreator  StorageStrategyChangedDTO(
            @JsonProperty("eventId") int eventId,
            @JsonProperty("aggregateKey") String aggregateKey,
            @JsonProperty("type") String type,
            @JsonProperty("storageStrategy") String storageStrategy); @JsonIgnore StorageStrategyChanged toEvent(); int getEventId(); String getAggregateKey(); String getType(); String getStorageStrategy(); @Override final boolean equals(Object o); @Override final int hashCode();  }