diff --git a/backend/src/test/java/org/cryptomator/hub/RemoteUserPullerTest.java b/backend/src/test/java/org/cryptomator/hub/RemoteUserPullerTest.java index 39094fb1..6771fa57 100644 --- a/backend/src/test/java/org/cryptomator/hub/RemoteUserPullerTest.java +++ b/backend/src/test/java/org/cryptomator/hub/RemoteUserPullerTest.java @@ -40,8 +40,8 @@ void setUp() { remoteUserPuller.userRepo = userRepo; remoteUserPuller.groupRepo = groupRepo; Mockito.doNothing().when(authorityRepo).persistAndFlush(Mockito.any()); - Mockito.doNothing().when(userRepo).persistAndFlush(Mockito.any()); - Mockito.doNothing().when(groupRepo).persistAndFlush(Mockito.any()); + Mockito.doNothing().when(userRepo).persist((User) Mockito.any()); + Mockito.doNothing().when(groupRepo).persist((Group) Mockito.any()); } @Nested @@ -156,7 +156,7 @@ public void testUpdateUsers(@ConvertWith(StringArrayConverter.class) String[] ke for (String userId : updatedUserIds) { var dbUser = databaseUsers.get(userId); - Mockito.verify(userRepo).persistAndFlush(dbUser); + Mockito.verify(userRepo).persist(dbUser); Mockito.verify(dbUser).setPictureUrl(String.format("picture %s", userId)); Mockito.verify(dbUser).setName(String.format("name %s", userId)); Mockito.verify(dbUser).setEmail(String.format("email %s", userId)); @@ -205,7 +205,7 @@ public void testUpdateGroups(@ConvertWith(StringArrayConverter.class) String[] k var dbGroup = databaseGroups.get(groupId); Mockito.verify(dbGroup).setName(String.format("name %s", groupId)); MatcherAssert.assertThat(dbGroupMembers, Matchers.containsInAnyOrder(user, otherKCUser)); - Mockito.verify(groupRepo).persistAndFlush(dbGroup); + Mockito.verify(groupRepo).persist(dbGroup); } } }