Spring Boot, Mockito, Unit Testing, Junit 5, Rest Api.
return savedBook; } @Override public List<Books> findAll() { List<Books> allBooks = List.of(Books.builder().build()); try{ allBooks = Optional.of(this.booksRepository.findAll()).get(); }catch (Exception exception){ this.logger.info("Error while fetching all records", exception); } return allBooks;