### Question:
PseudonymFilter extends CertificateFilter { @Override public boolean matches(final X509Certificate cert) { return AOUtil.isPseudonymCert(cert); }  @Override boolean matches(final X509Certificate cert); @Override String[] matches(final String[] aliases, final KeyStoreManager ksm);  }### Answer:
@Test @SuppressWarnings("static-method") public void testPolicyIdFilterMatch() throws Exception { final X509Certificate cert = (X509Certificate) CertificateFactory.getInstance("X.509").generateCertificate( ClassLoader.getSystemResourceAsStream("pseu-000.cer") ); Assert.assertTrue(new PseudonymFilter().matches(cert)); }
@Test @SuppressWarnings("static-method") @Ignore public void testPolicyIdFilter() throws Exception { final AOKeyStoreManager ksm = AOKeyStoreManagerFactory.getAOKeyStoreManager( AOKeyStore.DNIEJAVA, null, "TIFSEU", new CachePasswordCallback("12345".toCharArray()), null ); final String[] aliases = ksm.getAliases(); System.out.println("ORIGINAL"); for (final String alias : aliases) { System.out.println(alias); } System.out.println(); System.out.println("FILTRADOS"); final String[] fileteredAliases = new PseudonymFilter().matches(aliases, ksm); for (final String alias : fileteredAliases) { System.out.println(alias); } }