@Test(expected = U2fAuthenticationException.class)
public void finishSignature_badOrigin() throws Exception {

    Set<String> allowedOrigins = ImmutableSet.of("some-other-domain.com");
    SignRequest request = SignRequest.builder()
        .challenge(SERVER_CHALLENGE_SIGN_BASE64)
        .appId(APP_ID_SIGN)
        .keyHandle(KEY_HANDLE_BASE64)
        .build();
    SignResponse response = new SignResponse(CLIENT_DATA_SIGN_BASE64,
            SIGN_RESPONSE_DATA_BASE64, SERVER_CHALLENGE_SIGN_BASE64);
    u2f.finishSignature(request, response, new DeviceRegistration(KEY_HANDLE_BASE64, USER_PUBLIC_KEY_SIGN_HEX, ATTESTATION_CERTIFICATE, 0), allowedOrigins);
}