### Question:
CertificateSelector { public CertificateSelector<T> byEncodedPublicKey(final byte[] encodedPublicKey) { Preconditions.checkArgument( ArrayUtils.isNotEmpty(encodedPublicKey), "publicKey cannot be null or empty." ); setFieldValue( Certificate.ENCODED_PUBLIC_KEY_FIELD, Arrays.copyOf(encodedPublicKey, encodedPublicKey.length) ); return this; } CertificateSelector(
            final CertificateManager certificateManager,
            final Class<T> certificateClass);  CertificateSelector(
            final CertificateManager certificateManager,
            final Class<T> certificateClass, final boolean excludeArchivedCertificates); CertificateSelector<T> byEntityId(final UUID uuid); CertificateSelector<T> byHashCode(final int certificateHash); CertificateSelector<T> bySerialNumber(final BigInteger serialNumber); CertificateSelector<T> byHolderSerialNumber(final BigInteger holderSerialNumber); CertificateSelector<T> byIssuer(final String issuer); CertificateSelector<T> bySubject(final String subject); CertificateSelector<T> byIssuerOrganization(final String organization); CertificateSelector<T> bySubjectOrganization(final String organization); CertificateSelector<T> byEncodedPublicKey(final byte[] encodedPublicKey); CertificateSelector<T> byPublicKeyModulus(final BigInteger publicKeyModulus); T getCertificate(); Set<T> getCertificates(); X509Certificate getX509Certificate(); Set<X509Certificate> getX509Certificates(); KeyStore getKeyStore(); Class<T> getCertificateClass(); CertificateSelector<T> includeArchived();  }### Answer:
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullByEncodedPublicKey() { CertificateAuthorityCredential.select(certMan).byEncodedPublicKey(null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testEmptyByEncodedPublicKey() { CertificateAuthorityCredential.select(certMan).byEncodedPublicKey(new byte[]{}); }