@@ -68,7 +68,7 @@ public void shouldHandleWriteFailureOnConsume()
6868 {
6969 // Given
7070 when ( delegate .consume () )
71- .thenThrow ( new ClientException ( "Neo.ClientError.General.ForbiddenOnFollower " , "oh no!" ) );
71+ .thenThrow ( new ClientException ( "Neo.ClientError.Cluster.NotALeader " , "oh no!" ) );
7272 ClusteredStatementResult result =
7373 new ClusteredStatementResult ( delegate , LOCALHOST , onError );
7474
@@ -117,7 +117,7 @@ public void shouldHandleWriteFailureOnHasNext()
117117 {
118118 // Given
119119 when ( delegate .hasNext () )
120- .thenThrow ( new ClientException ( "Neo.ClientError.General.ForbiddenOnFollower " , "oh no!" ) );
120+ .thenThrow ( new ClientException ( "Neo.ClientError.Cluster.NotALeader " , "oh no!" ) );
121121 ClusteredStatementResult result =
122122 new ClusteredStatementResult ( delegate , LOCALHOST , onError );
123123
@@ -166,7 +166,7 @@ public void shouldHandleWriteFailureOnKeys()
166166 {
167167 // Given
168168 when ( delegate .keys () )
169- .thenThrow ( new ClientException ( "Neo.ClientError.General.ForbiddenOnFollower " , "oh no!" ) );
169+ .thenThrow ( new ClientException ( "Neo.ClientError.Cluster.NotALeader " , "oh no!" ) );
170170 ClusteredStatementResult result =
171171 new ClusteredStatementResult ( delegate , LOCALHOST , onError );
172172
@@ -215,7 +215,7 @@ public void shouldHandleWriteFailureOnList()
215215 {
216216 // Given
217217 when ( delegate .list () )
218- .thenThrow ( new ClientException ( "Neo.ClientError.General.ForbiddenOnFollower " , "oh no!" ) );
218+ .thenThrow ( new ClientException ( "Neo.ClientError.Cluster.NotALeader " , "oh no!" ) );
219219 ClusteredStatementResult result =
220220 new ClusteredStatementResult ( delegate , LOCALHOST , onError );
221221
@@ -264,7 +264,7 @@ public void shouldHandleWriteFailureOnNext()
264264 {
265265 // Given
266266 when ( delegate .next () )
267- .thenThrow ( new ClientException ( "Neo.ClientError.General.ForbiddenOnFollower " , "oh no!" ) );
267+ .thenThrow ( new ClientException ( "Neo.ClientError.Cluster.NotALeader " , "oh no!" ) );
268268 ClusteredStatementResult result =
269269 new ClusteredStatementResult ( delegate , LOCALHOST , onError );
270270
@@ -313,7 +313,7 @@ public void shouldHandleWriteFailureOnPeek()
313313 {
314314 // Given
315315 when ( delegate .peek () )
316- .thenThrow ( new ClientException ( "Neo.ClientError.General.ForbiddenOnFollower " , "oh no!" ) );
316+ .thenThrow ( new ClientException ( "Neo.ClientError.Cluster.NotALeader " , "oh no!" ) );
317317 ClusteredStatementResult result =
318318 new ClusteredStatementResult ( delegate , LOCALHOST , onError );
319319
@@ -362,7 +362,7 @@ public void shouldHandleWriteFailureOnSingle()
362362 {
363363 // Given
364364 when ( delegate .single () )
365- .thenThrow ( new ClientException ( "Neo.ClientError.General.ForbiddenOnFollower " , "oh no!" ) );
365+ .thenThrow ( new ClientException ( "Neo.ClientError.Cluster.NotALeader " , "oh no!" ) );
366366 ClusteredStatementResult result =
367367 new ClusteredStatementResult ( delegate , LOCALHOST , onError );
368368
0 commit comments