Category extends BaseEntity { public void addBook(Book book) { book.setCategory(this); books.add(book); } protected  Category();  Category(String name); String getName(); void setName(String name); List<Book> getBooks(); void addBook(Book book);  }
@Test public void addBook() throws Exception { category.addBook(new Book("Title3", "Author3", "Description3", 30, utils.Image2ByteArray("images/ElonMusk.jpg"), 1)); assertEquals(3, category.getBooks().size()); }