// 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;
//     }
// }


import com.edwise.completespring.entities.Book;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.when;
package com.edwise.completespring.assemblers;



@RunWith(MockitoJUnitRunner.class)
public class BookResourceAssemblerTest {
    private static final long BOOK_ID_TEST = 1234L;

    @Mock
// 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/test/java/com/edwise/completespring/assemblers/BookResourceAssemblerTest.java
import com.edwise.completespring.entities.Book;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.when;

package com.edwise.completespring.assemblers;



@RunWith(MockitoJUnitRunner.class)
public class BookResourceAssemblerTest {
    private static final long BOOK_ID_TEST = 1234L;

    @Mock
    private Book book;