VirgilCardClient implements CardClient { public List<RawSignedModel> searchCards(String identity, String token) throws VirgilServiceException { if (identity == null) { throw new NullArgumentException("CardClient -> 'identity' should not be null"); } if (identity.isEmpty()) { throw new EmptyArgumentException("CardClient -> 'identity' should not be empty"); } return searchCards(Collections.singletonList(identity), token); } VirgilCardClient();  VirgilCardClient(HttpClient httpClient);  VirgilCardClient(String serviceUrl);  VirgilCardClient(String serviceUrl, HttpClient httpClient);  VirgilCardClient(URL serviceUrl);  VirgilCardClient(URL serviceUrl, HttpClient httpClient); Tuple<RawSignedModel, Boolean> getCard(String cardId, String token); @Override List<String> getOutdated(Collection<String> cardIds, String token); HttpClient getHttpClient(); URL getServiceUrl(); RawSignedModel publishCard(RawSignedModel rawCard, String token); List<RawSignedModel> searchCards(String identity, String token); List<RawSignedModel> searchCards(Collection<String> identities, String token); void revokeCard(String cardId, String token); void setHttpClient(HttpClient httpClient);  }
@Test public void stc_25_search() throws CryptoException { String identity = Generator.identity(); try { cardClient.searchCards(Generator.identity(), mocker.generateFakeAccessToken(identity).stringRepresentation()); fail(); } catch (VirgilServiceException e) { assertEquals(HttpURLConnection.HTTP_BAD_REQUEST, e.getHttpError().getCode()); assertEquals(20303, e.getErrorCode()); } }