}
@Test
public void testCreateCard() {
CardDetails cardDetails = new CardDetails(null, "name", "login", "password", "url", "iconUrl", "note");
Card card = impl.createCard(userId, cardDetails, encryptionKey);
assertEquals(userId, card.getAccount().getUserId());
assertEquals(1, card.getAccount().getCards().size());
assertEquals(cardDetails.getIconUrl(),
cryptoEngine.decryptString(card.getIconUrl(),
encryptionKey,
card.getInitializationVector()));
assertEquals(cardDetails.getLogin(),
cryptoEngine.decryptString(card.getLogin(),
encryptionKey,
card.getInitializationVector()));
assertEquals(cardDetails.getName(),
cryptoEngine.decryptString(card.getName(),
encryptionKey,
card.getInitializationVector()));
assertEquals(cardDetails.getPassword(),
cryptoEngine.decryptString(card.getPassword(),
encryptionKey,
card.getInitializationVector()));
assertEquals(cardDetails.getUrl(),
cryptoEngine.decryptString(card.getUrl(),
encryptionKey,
card.getInitializationVector()));
assertEquals(cardDetails.getNote(),
cryptoEngine.decryptString(card.getNote(),
encryptionKey,
card.getInitializationVector()));
}