@Test
public void testConstructorAddsOneRegisteredKeyForEachGivenNonCompromisedDeviceRegistration() {

    DeviceRegistration good1 = mockDevice("A", false);
    DeviceRegistration good2 = mockDevice("B", false);
    DeviceRegistration bad1 = mockDevice("C", true);
    DeviceRegistration bad2 = mockDevice("D", true);
    RegisterRequestData result = new RegisterRequestData(
        "AppId",
        ImmutableList.of(good1, bad1, bad2, good2),
        new U2fPrimitives(),
        new RandomChallengeGenerator()
    );
    assertEquals(2, result.getRegisteredKeys().size());
    assertTrue(result.getRegisteredKeys().contains(new RegisteredKey(U2fPrimitives.U2F_VERSION, "A", null, null)));
    assertTrue(result.getRegisteredKeys().contains(new RegisteredKey(U2fPrimitives.U2F_VERSION, "B", null, null)));
}