### Question:
FindBookListsByAuthorInteractor implements FindBookListByAuthor { @Override public List<BookOutputData> getBooks(BookListByAuthorInputData bookListByAuthorInputData) { Optional<List<Book>> books = bookGateway.findByAuthor(bookListByAuthorInputData.getAuthor()); if (!books.isPresent()) { throw new BooksNotFoundException(); } return books.get().stream().map(Book::mapToBookOutputData).collect(Collectors.toList()); } FindBookListsByAuthorInteractor(BookGateway bookGateway); @Override List<BookOutputData> getBooks(BookListByAuthorInputData bookListByAuthorInputData);  }### Answer:
@Test public void should_return_list_of_books_by_author() { BookListByAuthorInputData bookListByAuthorInputData = BookListByAuthorInputData.builder() .author(ROBERT_C_MARTIN) .build(); Optional<List<Book>> books = Optional.of(Collections.singletonList(cleanArchitectureBook)); when(bookGateway.findByAuthor(any(String.class))).thenReturn(books); List<BookOutputData> bookOutputData = findBookListsByAuthorInteractor.getBooks(bookListByAuthorInputData); assertThat(bookOutputData.size()).isNotZero(); assertThat(bookOutputData.get(0).getAuthor()).isEqualTo(ROBERT_C_MARTIN); }