// Path: src/main/java/com/edwise/completespring/entities/Author.java
// @ApiModel(value = "Author entity", description = "Complete info of a entity author")
// @Data
// @Accessors(chain = true)
// @EqualsAndHashCode(doNotUseGetters = true)
// @ToString(doNotUseGetters = true)
// public class Author {
// 
//     @ApiModelProperty(value = "The name of the author", required = true)
//     @NotEmpty
//     private String name;
// 
//     @ApiModelProperty(value = "The surname of the author")
//     @NotEmpty
//     private String surname;
// 
//     public Author copyFrom(Author other) {
//         this.name = other.name;
//         this.surname = other.surname;
// 
//         return this;
//     }
// }
// 
// Path: src/main/java/com/edwise/completespring/entities/Book.java
// @Document(collection = "books")
// @ApiModel(value = "Book entity", description = "Complete info of a entity book")
// @Data
// @Accessors(chain = true)
// @EqualsAndHashCode(exclude = {"id"}, doNotUseGetters = true)
// @ToString(doNotUseGetters = true)
// public class Book {
// 
//     @ApiModelProperty(value = "The id of the book")
//     @Id
//     private Long id;
// 
//     @ApiModelProperty(value = "The title of the book", required = true)
//     @NotEmpty
//     private String title;
// 
//     @ApiModelProperty(value = "The authors of the book", required = true)
//     @Valid
//     private List<Author> authors;
// 
//     @ApiModelProperty(value = "The isbn of the book", required = true)
//     @NotEmpty
//     private String isbn;
// 
//     @ApiModelProperty(value = "The release date of the book", required = true, dataType = "LocalDate")
//     @NotNull
//     private LocalDate releaseDate;
// 
//     @ApiModelProperty(value = "The publisher of the book", required = true)
//     @Valid
//     @NotNull
//     private Publisher publisher;
// 
//     public Book copyFrom(Book other) {
//         this.title = other.title;
//         if (other.authors != null) {
//             this.authors = new ArrayList<>();
//             this.authors.addAll(other.authors.stream().map(new Author()::copyFrom).collect(Collectors.toList()));
//         }
//         this.isbn = other.isbn;
//         this.releaseDate = other.releaseDate;
//         if (other.publisher != null) {
//             this.publisher = new Publisher().copyFrom(other.publisher);
//         }
// 
//         return this;
//     }
// }
// 
// Path: src/main/java/com/edwise/completespring/entities/Publisher.java
// @ApiModel(value = "Publisher entity", description = "Complete info of a entity publisher")
// @Data
// @Accessors(chain = true)
// @EqualsAndHashCode(doNotUseGetters = true)
// @ToString(doNotUseGetters = true)
// public class Publisher {
// 
//     @ApiModelProperty(value = "The name of the publisher", required = true)
//     @NotEmpty
//     private String name;
// 
//     @ApiModelProperty(value = "The country of the publisher", required = true)
//     private String country;
// 
//     @ApiModelProperty(value = "If the publisher is online or not", required = true)
//     private boolean isOnline;
// 
//     public Publisher copyFrom(Publisher other) {
//         this.name = other.name;
//         this.country = other.country;
//         this.isOnline = other.isOnline;
// 
//         return this;
//     }
// }


import com.edwise.completespring.entities.Author;
import com.edwise.completespring.entities.Book;
import com.edwise.completespring.entities.Publisher;
import java.time.LocalDate;
import java.util.List;
package com.edwise.completespring.testutil;



public class BookBuilder {

    private final Book book;

    public BookBuilder() {
        book = new Book();
    }

    public BookBuilder id(Long id) {
        book.setId(id);
        return this;
    }

    public BookBuilder title(String title) {
        book.setTitle(title);
        return this;
    }

// Path: src/main/java/com/edwise/completespring/entities/Author.java
// @ApiModel(value = "Author entity", description = "Complete info of a entity author")
// @Data
// @Accessors(chain = true)
// @EqualsAndHashCode(doNotUseGetters = true)
// @ToString(doNotUseGetters = true)
// public class Author {
// 
//     @ApiModelProperty(value = "The name of the author", required = true)
//     @NotEmpty
//     private String name;
// 
//     @ApiModelProperty(value = "The surname of the author")
//     @NotEmpty
//     private String surname;
// 
//     public Author copyFrom(Author other) {
//         this.name = other.name;
//         this.surname = other.surname;
// 
//         return this;
//     }
// }
// 
// Path: src/main/java/com/edwise/completespring/entities/Book.java
// @Document(collection = "books")
// @ApiModel(value = "Book entity", description = "Complete info of a entity book")
// @Data
// @Accessors(chain = true)
// @EqualsAndHashCode(exclude = {"id"}, doNotUseGetters = true)
// @ToString(doNotUseGetters = true)
// public class Book {
// 
//     @ApiModelProperty(value = "The id of the book")
//     @Id
//     private Long id;
// 
//     @ApiModelProperty(value = "The title of the book", required = true)
//     @NotEmpty
//     private String title;
// 
//     @ApiModelProperty(value = "The authors of the book", required = true)
//     @Valid
//     private List<Author> authors;
// 
//     @ApiModelProperty(value = "The isbn of the book", required = true)
//     @NotEmpty
//     private String isbn;
// 
//     @ApiModelProperty(value = "The release date of the book", required = true, dataType = "LocalDate")
//     @NotNull
//     private LocalDate releaseDate;
// 
//     @ApiModelProperty(value = "The publisher of the book", required = true)
//     @Valid
//     @NotNull
//     private Publisher publisher;
// 
//     public Book copyFrom(Book other) {
//         this.title = other.title;
//         if (other.authors != null) {
//             this.authors = new ArrayList<>();
//             this.authors.addAll(other.authors.stream().map(new Author()::copyFrom).collect(Collectors.toList()));
//         }
//         this.isbn = other.isbn;
//         this.releaseDate = other.releaseDate;
//         if (other.publisher != null) {
//             this.publisher = new Publisher().copyFrom(other.publisher);
//         }
// 
//         return this;
//     }
// }
// 
// Path: src/main/java/com/edwise/completespring/entities/Publisher.java
// @ApiModel(value = "Publisher entity", description = "Complete info of a entity publisher")
// @Data
// @Accessors(chain = true)
// @EqualsAndHashCode(doNotUseGetters = true)
// @ToString(doNotUseGetters = true)
// public class Publisher {
// 
//     @ApiModelProperty(value = "The name of the publisher", required = true)
//     @NotEmpty
//     private String name;
// 
//     @ApiModelProperty(value = "The country of the publisher", required = true)
//     private String country;
// 
//     @ApiModelProperty(value = "If the publisher is online or not", required = true)
//     private boolean isOnline;
// 
//     public Publisher copyFrom(Publisher other) {
//         this.name = other.name;
//         this.country = other.country;
//         this.isOnline = other.isOnline;
// 
//         return this;
//     }
// }


// Path: src/test/java/com/edwise/completespring/testutil/BookBuilder.java
import com.edwise.completespring.entities.Author;
import com.edwise.completespring.entities.Book;
import com.edwise.completespring.entities.Publisher;
import java.time.LocalDate;
import java.util.List;

package com.edwise.completespring.testutil;



public class BookBuilder {

    private final Book book;

    public BookBuilder() {
        book = new Book();
    }

    public BookBuilder id(Long id) {
        book.setId(id);
        return this;
    }

    public BookBuilder title(String title) {
        book.setTitle(title);
        return this;
    }

    public BookBuilder authors(List<Author> authors) {