Skip to content

Commit 53e4480

Browse files
committed
fix test
1 parent 998a19b commit 53e4480

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/test/java/com/google/cloud/sql/core/CloudSqlInstanceTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.junit.runner.RunWith;
2929
import org.junit.runners.JUnit4;
3030
import org.mockito.Mock;
31+
import org.mockito.MockitoAnnotations;
3132

3233
@RunWith(JUnit4.class)
3334
public class CloudSqlInstanceTest {
@@ -43,7 +44,9 @@ public class CloudSqlInstanceTest {
4344

4445
@Before
4546
public void setup() throws IOException {
46-
when(googleCredentials.createScoped()).thenReturn(scopedCredentials);
47+
MockitoAnnotations.openMocks(this);
48+
when(googleCredentials.createScoped(
49+
"https://www.googleapis.com/auth/sqlservice.login")).thenReturn(scopedCredentials);
4750
}
4851

4952
@Test

0 commit comments

Comments
 (0)