Skip to content

Commit f5cd6fa

Browse files
committed
chore: use withoutAnnotations() when mocking MetricServiceStub in monitoring exporter test
1 parent 96c4420 commit f5cd6fa

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎java-bigtable/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/exporter/BigtableCloudMonitoringExporterTest.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public class BigtableCloudMonitoringExporterTest {
8181

8282
@Rule public final MockitoRule mockitoRule = MockitoJUnit.rule();
8383

84-
@Mock private MetricServiceStub mockMetricServiceStub;
84+
private MetricServiceStub mockMetricServiceStub;
8585
private MetricServiceClient fakeMetricServiceClient;
8686
private BigtableCloudMonitoringExporter exporter;
8787

@@ -107,6 +107,8 @@ public class BigtableCloudMonitoringExporterTest {
107107

108108
@Before
109109
public void setUp() {
110+
mockMetricServiceStub =
111+
mock(MetricServiceStub.class, org.mockito.Mockito.withSettings().withoutAnnotations());
110112
fakeMetricServiceClient = new FakeMetricServiceClient(mockMetricServiceStub);
111113

112114
exporter =

0 commit comments

Comments
 (0)