Commit 758740a3 authored by Komal Makkar's avatar Komal Makkar
Browse files

UT updated

parent 8b5625c5
Pipeline #7383 failed with stages
in 2 minutes and 44 seconds
......@@ -97,24 +97,26 @@ public class ServiceAccountClientImplTest {
public void should_getTokenFromCache_getIdTokenTest() {
// SetUp
when(tenantJwtCacheMock.get(any())).thenReturn(idToken);
String expectedToken = "Bearer " +idToken.getTokenValue();
// Act
String returnedIdToken = sut.getIdToken(tenantName);
// Assert
Assert.assertEquals(idToken.getTokenValue(), returnedIdToken);
Assert.assertEquals(expectedToken, returnedIdToken);
}
@Test
public void should_updateCache_getIdTokenTest() {
// Set up
when(tenantJwtCacheMock.get(any())).thenReturn(idToken);
String expectedToken = "Bearer " +idToken.getTokenValue();
// Act
String returnedToken = this.sut.getIdToken(tenantName);
// Assert
Assert.assertEquals(validToken, returnedToken);
Assert.assertEquals(expectedToken, returnedToken);
}
@Test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment