    @Test
    public void test_authenticate_2factor() throws Exception {

        // set up mock
        List<String> publicKeyCredentialIds = new ArrayList<>();
        publicKeyCredentialIds.add(getRandomString(32));
        when(context.getUser().getAttribute(WebAuthnConstants.PUBKEY_CRED_ID_ATTR)).thenReturn(publicKeyCredentialIds);

        // test
        try {
        	authenticator.authenticate(context);
        } catch (Exception e) {
            Assert.fail(e.getMessage());
        }
        verify(context).challenge(any(Response.class));
    }