Skip to content

Commit ff1bd60

Browse files
committed
Fix unstubbed Exception for spring-test-6.2.0
1 parent 14c344d commit ff1bd60

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

spring-session-data-redis/src/integration-test/java/org/springframework/session/data/redis/RedisIndexedSessionRepositoryDynamicITests.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,8 @@
3737

3838
import static org.assertj.core.api.Assertions.assertThat;
3939
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
40-
import static org.mockito.ArgumentMatchers.any;
4140
import static org.mockito.ArgumentMatchers.anyString;
4241
import static org.mockito.BDDMockito.given;
43-
import static org.mockito.BDDMockito.willAnswer;
4442
import static org.mockito.Mockito.spy;
4543

4644
/**
@@ -68,10 +66,6 @@ void findByIdWhenSessionDeletedWhileSavingDeltaThenThrowIllegalStateException()
6866

6967
BoundHashOperations<String, Object, Object> opsForHash = spy(this.spyOperations.boundHashOps(anyString()));
7068
given(this.spyOperations.boundHashOps(anyString())).willReturn(opsForHash);
71-
willAnswer((invocation) -> {
72-
this.sessionRepository.deleteById(session.getId());
73-
return invocation.callRealMethod();
74-
}).given(opsForHash).putAll(any());
7569

7670
this.sessionRepository.save(session);
7771
assertThatIllegalStateException().isThrownBy(() -> this.sessionRepository.findById(session.getId()))
@@ -87,10 +81,6 @@ void findByIdWhenSessionDeletedWhileSavingDeltaAndSafeMapperThenSessionIsNull()
8781

8882
BoundHashOperations<String, Object, Object> opsForHash = spy(this.spyOperations.boundHashOps(anyString()));
8983
given(this.spyOperations.boundHashOps(anyString())).willReturn(opsForHash);
90-
willAnswer((invocation) -> {
91-
this.sessionRepository.deleteById(session.getId());
92-
return invocation.callRealMethod();
93-
}).given(opsForHash).putAll(any());
9484

9585
this.sessionRepository.save(session);
9686
assertThat(this.sessionRepository.findById(session.getId())).isNull();

0 commit comments

Comments
 (0)