@Test
void test() {

    assertThatThrownBy(() -> {
        final SecurityContext securityContext = new SecurityContextImpl(null, null, null, null, null);
        securityContext.secure(Assertions::fail);
    }).isInstanceOf(AuthenticationException.class);
}