@Test
public void startSignatureShouldReturnARandomChallenge() throws Exception {

    DeviceRegistration deviceRegistration = new DeviceRegistration(KEY_HANDLE_BASE64, USER_PUBLIC_KEY_SIGN_HEX, ATTESTATION_CERTIFICATE, 0);
    SignRequestData data = u2f.startSignature("example.com", ImmutableList.of(deviceRegistration));
    SignRequestData data2 = u2f.startSignature("example.com", ImmutableList.of(deviceRegistration));
    assertEquals(1, data.getSignRequests().size());
    assertNotNull(data.getSignRequests().get(0).getChallenge());
    assertNotEquals(
        "startSignature must not return the same challenge twice in a row.",
        data.getSignRequests().get(0).getChallenge(),
        data2.getSignRequests().get(0).getChallenge()
    );
}