@Test
void test_트랜잭션() throws Exception {

    //given
    Long bookId = bookRepository.save(Book.builder()
            .name("a")
            .build())
            .getId();
    //when
    String result = "b";
    bookService.update(bookId, result);
    //then
    Book book = bookRepository.findById(bookId).get();
    assertThat(book.getName()).isEqualTo(result);
}