@Test public void shouldReturnEmptyOptionalWhenNotFound() { assertThat(service.find("1234")).isEmpty(); }
@Override public Optional<Book> find(String isbn) { return Optional.ofNullable(books.get(isbn)); }
InMemoryBookService implements BookService { @Override public Optional<Book> find(String isbn) { return Optional.ofNullable(books.get(isbn)); } }
InMemoryBookService implements BookService { @Override public Optional<Book> find(String isbn) { return Optional.ofNullable(books.get(isbn)); }  }
InMemoryBookService implements BookService { @Override public Optional<Book> find(String isbn) { return Optional.ofNullable(books.get(isbn)); }  @Override Iterable<Book> findAll(); @Override Book create(Book book); @Override Optional<Book> find(String isbn); }
InMemoryBookService implements BookService { @Override public Optional<Book> find(String isbn) { return Optional.ofNullable(books.get(isbn)); }  @Override Iterable<Book> findAll(); @Override Book create(Book book); @Override Optional<Book> find(String isbn);  }