Skip to content

Commit

Permalink
feat(impl):[#259] fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-ext-kmassalski committed Dec 20, 2023
1 parent 288c19f commit 63db1a3
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ void shouldReturnApiKeyAuthentication() {
@Test
void shouldThrowExceptionWhenXApiKeyHeaderIsMissing() {
final MockHttpServletRequest noApiKeyRequest = new MockHttpServletRequest();
when(apiKeysConfiguration.authorityOf(noApiKeyRequest.getHeader("X-API-KEY"))).thenThrow(new BadCredentialsException("Wrong ApiKey"));

assertThrows(BadCredentialsException.class, () -> authenticationService.getAuthentication(noApiKeyRequest));
}
Expand Down

0 comments on commit 63db1a3

Please sign in to comment.