BAEL-13321 Fixed test-data creation logic in live test

This commit is contained in:
Dhawal Kapil 2019-03-13 23:10:59 +05:30
parent 895aad42f9
commit ddd3591e0b
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ public class SpringDataProjectionLiveTest {
@Before
public void setup() {
if (bookRepo.findById(1L) == null) {
if (!bookRepo.findById(1L).isPresent()) {
Book book = new Book("Animal Farm");
book.setIsbn("978-1943138425");
book = bookRepo.save(book);