@Test(expected = IllegalArgumentException.class)
public void finishSignatureShouldDetectIncorrectDeviceRegistration() throws Exception {

    SignRequest signRequest = SignRequest.builder()
        .challenge(SERVER_CHALLENGE_SIGN_BASE64)
        .appId(APP_ID_SIGN)
        .keyHandle(KEY_HANDLE_BASE64)
        .build();
    SignResponse tokenResponse = new SignResponse(
        CLIENT_DATA_SIGN_BASE64,
        SIGN_RESPONSE_DATA_BASE64,
        KEY_HANDLE_BASE64
    );
    u2f.finishSignature(
        signRequest,
        tokenResponse,
        new DeviceRegistration(
            "ARGHABLARGHLER",
            USER_PUBLIC_KEY_SIGN_HEX,
            ATTESTATION_CERTIFICATE,
            0
        ),
        allowedOrigins
    );
}