use of com.duosecurity.model.HealthCheckResponse in project cas by apereo.
the class UniversalPromptDuoSecurityAuthenticationServiceTests method verifyPing.
@Test
public void verifyPing() throws Exception {
val duoClient = mock(Client.class);
when(duoClient.healthCheck()).thenReturn(new HealthCheckResponse());
val duoProperties = new DuoSecurityMultifactorAuthenticationProperties();
val service = new UniversalPromptDuoSecurityAuthenticationService(duoProperties, mock(HttpClient.class), duoClient, List.of(MultifactorAuthenticationPrincipalResolver.identical()), Caffeine.newBuilder().build());
assertTrue(service.getDuoClient().isPresent());
assertTrue(service.ping());
}
Aggregations