Skip to content

Commit

Permalink
Non static mock
Browse files Browse the repository at this point in the history
  • Loading branch information
marcgs committed Jul 25, 2022
1 parent 9182b28 commit 83d387c
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
Expand All @@ -51,7 +50,7 @@ public class IdentityHubCredentialsVerifierTest {

private static final Faker FAKER = new Faker();
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
private static final Monitor monitorMock = mock(Monitor.class);
private Monitor monitorMock = mock(Monitor.class);
private IdentityHubClient identityHubClientMock = mock(IdentityHubClient.class);
private JwtCredentialsVerifier jwtCredentialsVerifierMock = mock(JwtCredentialsVerifier.class);

Expand Down Expand Up @@ -85,7 +84,6 @@ private void setUpMocks(SignedJWT jws, boolean isSigned, boolean claimsValid) {
when(identityHubClientMock.getVerifiableCredentials(hubBaseUrl)).thenReturn(StatusResult.success(List.of(jws)));
when(jwtCredentialsVerifierMock.isSignedByIssuer(jws)).thenReturn(isSigned);
when(jwtCredentialsVerifierMock.verifyClaims(eq(jws), any())).thenReturn(claimsValid);
reset(monitorMock);
}

@Test
Expand Down

0 comments on commit 83d387c

Please sign in to comment.