BAEL-13321 Fixed test-data creation logic in live test
This commit is contained in:
parent
895aad42f9
commit
ddd3591e0b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue