diff --git a/java-spanner/google-cloud-spanner/src/test/java/com/google/cloud/spanner/PartitionedDmlTransactionTest.java b/java-spanner/google-cloud-spanner/src/test/java/com/google/cloud/spanner/PartitionedDmlTransactionTest.java index 4e0609e81335..ec7776ac1b85 100644 --- a/java-spanner/google-cloud-spanner/src/test/java/com/google/cloud/spanner/PartitionedDmlTransactionTest.java +++ b/java-spanner/google-cloud-spanner/src/test/java/com/google/cloud/spanner/PartitionedDmlTransactionTest.java @@ -370,7 +370,8 @@ public void testExecuteStreamingPartitionedUpdateRSTstream() { ResultSetStats stats = ResultSetStats.newBuilder().setRowCountLowerBound(1000L).build(); PartialResultSet p1 = PartialResultSet.newBuilder().setResumeToken(resumeToken).build(); PartialResultSet p2 = PartialResultSet.newBuilder().setStats(stats).build(); - ServerStream stream1 = mock(ServerStream.class); + ServerStream stream1 = + mock(ServerStream.class, withSettings().withoutAnnotations()); Iterator iterator = mock(Iterator.class); when(iterator.hasNext()).thenReturn(true, true, false); when(iterator.next()) @@ -382,7 +383,8 @@ public void testExecuteStreamingPartitionedUpdateRSTstream() { GrpcStatusCode.of(Code.INTERNAL), true)); when(stream1.iterator()).thenReturn(iterator); - ServerStream stream2 = mock(ServerStream.class); + ServerStream stream2 = + mock(ServerStream.class, withSettings().withoutAnnotations()); when(stream2.iterator()).thenReturn(ImmutableList.of(p1, p2).iterator()); when(rpc.executeStreamingPartitionedDml( Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class))) @@ -407,7 +409,8 @@ public void testExecuteStreamingPartitionedUpdateRSTstream() { @Test public void testExecuteStreamingPartitionedUpdateGenericInternalException() { PartialResultSet p1 = PartialResultSet.newBuilder().setResumeToken(resumeToken).build(); - ServerStream stream1 = mock(ServerStream.class); + ServerStream stream1 = + mock(ServerStream.class, withSettings().withoutAnnotations()); Iterator iterator = mock(Iterator.class); when(iterator.hasNext()).thenReturn(true, true, false); when(iterator.next())